【问题标题】:Reversing one y-axis of a plotyy反转plotyy的一个y轴
【发布时间】:2014-04-26 18:36:08
【问题描述】:

我的代码:

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'.

【问题讨论】:

  • 您可以在绘图命令中使用“flipud”或“fliplr”。

标签: matlab plot


【解决方案1】:

Ydir 是轴的可写属性,而不是图形对象的:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-30
    • 2011-01-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多