Reputation: 406
My code:
figure
[ax, h1, h2] = plotyy(x1,y1,x2,y2,'semilogy','semilogy');
Now I want to reverse the direction of the second y-axis. I tried adding:
set(h2,'YDir','reverse');
But that results in the following error:
The name 'YDir' is not an accessible property for an instance of class 'lineseries'.
Upvotes: 3
Views: 931
Reputation: 36720
Ydir
is a writeable property of a axis, not of the graphics object:
set(ax(2),'YDir','reverse')
Upvotes: 4