Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Different color options for two Y axis based bar charts
Replies: 1   Last Post: Mar 28, 2013 3:50 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Muhammad

Posts: 29
Registered: 3/21/08
Different color options for two Y axis based bar charts
Posted: Mar 27, 2013 7:12 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.