Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
Conal Doyle
Conal Doyle el 3 de Jul. de 2013
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'?

Respuestas (0)

Categorías

Más información sobre Colormaps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by