Colormap won't change
古いコメントを表示
Colormap no longer changes the colour map used by a plot?
I declare some new colours:
cols = [0.60 0.86 0.91; % skyblue
0.90 0.96 0.94; % paleblue
0.82 0.71 0.48; % palebrown
0.87 0.42 0.41; % pink
0.97 0.65 0.52; % palepink
0.98 0.84 0.66; % sand
0.58 0.74 0.81; % midblue
0.60 0.86 0.72; % steel
1.00 0.97 0.50; % paleyellow
0.80 0.89 0.25; % lime
0.30 0.75 0.59; % turquoise
0.70 0.71 0.27; % olive
0.50 0.80 0.32; % palegreen
0.98 0.78 0.20; % mustard
0.70 0.57 0.46]; % chocolate
Then I construct my data array (multiple series)
Then I open a figure, and set the colormap to my colours.
Then I create axes, and again set their colormap to my colours.
I plot my series, and again set the colormap (both syntaxes this time).
Finally a legend, with - yes! - another colormap call.
f1 = figure;
orient landscape;
colormap(f1,cols)
ax = axes('Position',[0.1,0.1,0.8,0.8],'Box','on');
colormap(ax,cols)
plot(xvy,dy,'LineWidth',1);
colormap(ax,cols)
colormap(cols)
legend(labs,'Location','southwest')
colormap(ax, cols)
It still just displays seven Parula colours and recycles them for my remaining series (I have ten).
Obviously I've tried colormap calls everywhere separately as well.
Thanks for any obvious error spotting!
Harry
1 件のコメント
Stephen23
2017 年 12 月 6 日
"...It still just displays seven Parula colours..."
I doubt that. Unless someone set the default ColorOrder to parula.
採用された回答
その他の回答 (1 件)
カテゴリ
ヘルプ センター および File Exchange で Color and Styling についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!