How to change the order on vertical axis on a figure ?

12 ビュー (過去 30 日間)
M.S. Khan
M.S. Khan 2019 年 9 月 27 日
コメント済み: M.S. Khan 2019 年 9 月 27 日
From the below code, in the figure, vertical axis is from -1 to 2. i want to change the order i.e 2 to -1. Thanks for all cooperation.
x = linspace(0,3*pi,200);
y = cos(x) + rand(1,200);
scatter(x,y)
Screen Shot 2019-09-27 at 12.33.00 PM.png

採用された回答

Ankit
Ankit 2019 年 9 月 27 日
hi,
you could try this
x = linspace(0,3*pi,200);
y = cos(x) + rand(1,200);
scatter(x,y)
set(gca,'YDir','reverse')
  1 件のコメント
M.S. Khan
M.S. Khan 2019 年 9 月 27 日
Thanks Mr. Ankit. Warm Regards

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

その他の回答 (0 件)

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by