Using the same Colors for a Bar and a Plot graph?

1 回表示 (過去 30 日間)
Conal Doyle
Conal Doyle 2013 年 7 月 3 日
figure hold all
subplot(2,2,1:2)
bar(PnL_Major);
title ('Evolution of PnL for Major pairs week by week');
xlabel('Time(Weeks)');
ylabel('PnL');
set(gca,'XTick',XTicks);
set(gca,'XTickLabel',XLabels);
legend('EURUSD','EURGBP','EURJPY','USDJPY','GBPUSD','USDCHF','USDCAD','AUDUSD','NZDUSD');
subplot(2,2,3)
h=plot(Volume_Major,'LineWidth',2);
title ('Evolution of Volume for Major pairs week by week');
xlabel('Time(Weeks)');
ylabel('Volume');
set(gca,'XTick',XTicks);
set(gca,'XTickLabel',XLabels);
legend('EURUSD','EURGBP','EURJPY','USDJPY','GBPUSD','USDCHF','USDCAD','AUDUSD','NZDUSD');
I want to able to use the same colors used by the function 'bar' in the function 'plot' as they both use different colormaps by default. Is there anyway of setting the 'plot' function so it will produce the exact same colors as plotted defaultly by the 'bar' function?
As far as I can tell, 'bar' uses colormap 'jet' and 'plot' uses colormap 'lines'?

回答 (0 件)

カテゴリ

Help Center および File ExchangeColormaps についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by