"dpb" wrote in message <jn9orp$uo5$
1...@speranza.aioe.org>...
Thanks, dpb. The following code plots two series of scatter data on one plot with two y tick labels.
%% Plot data with two y tick labels
[AX,H1,H2] = plotyy(x,y1,x,y2,@scatter,@scatter); %[axes handle, line1 h, line2 h]
set(...
get(AX(1),'Ylabel'),...
'String', 'Total Nitrogen (%removal of annual load)',...
'Fontsize',15 ...
)
set(get(AX(2),'Ylabel'),'String','Reuse (%requested supplied)','Fontsize',15)
set(AX(1),'Xlim',[(min(x)-1) (max(x)+1)],...
'Ylim',[(min(y1)-1) (max(y1)+1)],'YTick', (35):10:85)
set(AX(2),'Xlim',[(min(x)-1) (max(x)+1)],...
'Ylim',[(min(y2)-1) (max(y2)+1)],'YTick', (min(y2)):5:(max(y2)))
get(AX(1))
get(AX(1),'Ylabel')
get(get(AX(1),'Ylabel'))
xlabel('LifeCycle Cost ($millions)','Fontsize',15);title('Non-dominated solutions for Total Nitrogen vs LifeCycle Cost','Fontsize',15)
% check out the result of '\musec' in the xlabel in the previous command
set(H1, 'MarkerEdgeColor', 'red', 'MarkerFaceColor', 'red') % here H1 is plot landle
set(H2, 'MarkerEdgeColor', 'blue', 'MarkerFaceColor', 'none')
set(AX(1),'ycolor','r','lineWidth', 2) % y1 axis color
set(AX(2),'ycolor','b','lineWidth', 2) % y2 axis color