Date: Mar 27, 2013 7:12 PM
Author: Muhammad
Subject: Different color options for two Y axis based bar charts

Hello:

I have one X axis and two Y axis, i.e., two different set of outputs for the same input. I want to represent the two Y label data with different color. I am using the following code.

figure(2);

[AX,H1,H2] = plotyy(Channel,Gain,Channel,P,'bar');

set(get(AX(1),'Ylabel'),'String','Link Gain');
set(get(AX(2),'Ylabel'),'String','Optimal Transmit Power');

xlabel('Channel Index');
title('Link Gain and Transmit Power Optimization');

set(H1,'bar_color','r');
set(H2,'bar_color','b');

Unfortunately, this is not working. Matlab says that there is no barcolor property in the 'barseries' class.

How can I do it? Any feedback will be appreciated.

Thanks,

Nazmul