2014-04-26 44 views
2

我的代碼的一個y軸:逆轉的plotyy

figure 
[ax, h1, h2] = plotyy(x1,y1,x2,y2,'semilogy','semilogy'); 

現在我想扭轉所述第二y軸的方向。我嘗試添加:

set(h2,'YDir','reverse'); 

但是,這將導致以下錯誤:

The name 'YDir' is not an accessible property for an instance of class 'lineseries'. 
+0

您可以使用在你的劇情指令中有'flipud'或'fliplr'。 – oligilo

回答

3

Ydir是一個軸的可寫屬性,而不是圖形對象:

set(ax(2),'YDir','reverse')