- #1
Old Guy
- 103
- 1
Here is the relevant piece of code as it stands now:
figure(2)
[AX,H1,H2] = plotyy(plot2data(:,1),plot2data(:,2),plot2data(:,1),...
plot2data(:,3));
set(get(AX(1),'Ylabel'),'String','Mean Value of C_{a}','Color','k')
set(get(AX(2),'Ylabel'),'String','Mean Value of C_{b}','Color','k')
set(H1,'LineWidth',2,'Color','k')
set(H2,'LineWidth',2,'Color','r')
xlabel('K');
legend('Mean Value of C_{a}','Mean Value of C_{b}','Location','West');
title(strcat('T=',num2str(T)));
I have two questions. The first is that I want both vertical axes to be black - I'm currently getting different colors. The first two set commands above change the color of the axis label, but the numbers along the axes remain different colors. How can I change those?
The second question is: How can I change the range on one or both of the vertical axes? My immediate desire would be to do something like
axis tight
but only on AX(2).
Thanks!
figure(2)
[AX,H1,H2] = plotyy(plot2data(:,1),plot2data(:,2),plot2data(:,1),...
plot2data(:,3));
set(get(AX(1),'Ylabel'),'String','Mean Value of C_{a}','Color','k')
set(get(AX(2),'Ylabel'),'String','Mean Value of C_{b}','Color','k')
set(H1,'LineWidth',2,'Color','k')
set(H2,'LineWidth',2,'Color','r')
xlabel('K');
legend('Mean Value of C_{a}','Mean Value of C_{b}','Location','West');
title(strcat('T=',num2str(T)));
I have two questions. The first is that I want both vertical axes to be black - I'm currently getting different colors. The first two set commands above change the color of the axis label, but the numbers along the axes remain different colors. How can I change those?
The second question is: How can I change the range on one or both of the vertical axes? My immediate desire would be to do something like
axis tight
but only on AX(2).
Thanks!