set limits of y in plotyy
  Home FAQ Contact Sign in
comp.softsys.matlab only
 
Advanced search
POPULAR GROUPS

more...

 Up
set limits of y in plotyy         

Group: comp.softsys.matlab · Group Profile
Author: Mike
Date: May 8, 2008 20:51

Hi

I'd plot two y1 and one y2 on the right and use following:

[AX,H1,H2] = plotyy(x,[y1a,y1b],x,y2);

Markers = '.ox+*sdv^<>ph';
noMarkers = length(Markers);
H1c = findobj(H1,'Type','line');
H2c = findobj(H2,'Type','line');
linehandles = [H1c;H2c];
for K = 1:length(linehandles)

set(linehandles(K),'Marker',Markers(1+mod(K-1,noMarkers)),'Color','k');
end %%(thanks to Walter:
http://groups.google.com/group/comp.soft-sys.matlab/browse_thread/thread/a9946f7...#263a2dde95f0caec)

set(AX,'xlim',[xmin xmax],'YColor',[0 0 0]);
ylim([0 0.3]);
Now I'll have three subplots.
However, the limits of y2 axis(right hand) are not the same.
How to set same limits of y2 axis in all subplots?

Thank you in advance.

Mike
2 Comments
diggit! del.icio.us! reddit!