Invert or reverse Yaxis ticks in a plot or scatter graph

13 ビュー (過去 30 日間)
Stephen Devlin
Stephen Devlin 2017 年 8 月 22 日
コメント済み: José-Luis 2017 年 8 月 22 日
Hi,
I can find documentation to reverse the Yaxis for imagesc but not for a regular plot. I have data where the origin is the top left hand corner and want to preserve that y measurement rather than have it flipped.
sample code:
x=1:10
y=[0.4 0.61 0.45 0.66 0.41 0.63 0.44 0.62 0.46 0.6]
scatter(x,y,'filled','bo')
What I would like to see is a plot with the axis left the way it is but the Y-axis start with say 0.4 at the top and increase as it gets closer to the Xaxis intercept.
Any ideas?

採用された回答

José-Luis
José-Luis 2017 年 8 月 22 日
x=1:10;
y=[0.4 0.61 0.45 0.66 0.41 0.63 0.44 0.62 0.46 0.6];
aH = axes;
scatter(aH,x,y,'filled','bo');
aH.YDir = 'reverse';
  2 件のコメント
Stephen Devlin
Stephen Devlin 2017 年 8 月 22 日
Perfect, thank you José.
José-Luis
José-Luis 2017 年 8 月 22 日
My pleasure.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeScatter Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by