Change Secod Axis Color And Tick Label Colors
112 views (last 30 days)
Show older comments
I have a snippet of code that uses plotyy
figure;
x = 1:size(X1,1);
xlim([1,max(x)]);
y1 = env_data_values(1:m,12);
y2 = I_spec_max;
[haxes,hline1,hline2] = plotyy(x,y1,x,y2,'plot');
axes(haxes(1))
ylabel('Temperature ({^o}C)','Color','b')
axes(haxes(2))
ylabel('I_m_a_x','Color','r')
set(hline2,'Color','r')
set(hline1,'Color','b')
title('Dev OA TE Cooler vs. I_m_a_x');
hleg1=legend('I_m_a_x');
set(hleg1,'Location','NorthEast', 'Color', 'none', 'Box', 'off');
The right y-axis, tick marks and tick mark labels are green. I can't figure out how to change the color to red to match the color of the lie plot.
I've searched Answers, but haven't found anything that I can understand.
Thanks in advance.
0 Comments
Answers (1)
See Also
Categories
Find more on Two y-axis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!