Question about YDir, reverse
显示 更早的评论
Hello all,
I was trying to draw the plot and reverse the Y direction of the plot with following code:
P = plot(x, y)
set(P, 'YDir', 'reverse');
However, the matlab command says that
Error using
matlab.graphics.chart.primitive.Line/set
There is no YDir property on the Line class.
Then if I click matlab.graphics.chart.primitive.Line/set, it says
There is no documentation for matlab.graphics.chart.primitive.Line/set
What should I do? Any help will be appreciated.
Thank you
采纳的回答
更多回答(1 个)
Giorgos Papakonstantinou
2015-2-17
编辑:Giorgos Papakonstantinou
2015-2-17
It should be
set(gca, 'Ydir', 'reverse')
The plot as mentioned above does not have a property Ydir. However, the axes which the plot belongs to has this property.
类别
在 帮助中心 和 File Exchange 中查找有关 Mathematics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!