2
我設計我在MATLAB仿真的可視化,看起來像這樣:使色彩的情節和於imagesc相同
如何讓這個plot
和imagesc
使用相同的顏色嗎?我希望能夠看到情節中的傳說,並將該行與左側可視化中的相同顏色進行比較。
MWE:
field=randi(7,10);
distribution=rand(100,7);
h=figure(1);
set(gcf,'PaperPositionMode','auto')
set(h, 'Position', [500 500 1000 500])
subplot(1,2,1);
imagesc(field);
colormap('copper');
subplot(1,2,2);
plot(distribution);
legend('1','2','3','4','5','6','7')
你好,感謝您。由於某種原因,這不適合我。你能看看我在我的問題中附加的代碼嗎? – 2014-11-21 00:24:57
我的典型運氣!它不起作用,因爲在線顏色使用默認的着色方案:/ – 2014-11-21 00:28:59
對不起,我的意思是它使用默認的*顏色順序*,即它看起來就像以前一樣。這就是MWE尋找我的方式:[link](http://i.stack.imgur.com/hAdfa.png)。 – 2014-11-21 00:33:05