reverse the y axis

8 ビュー (過去 30 日間)
Nidhi SRIVASTAVA
Nidhi SRIVASTAVA 2017 年 6 月 6 日
コメント済み: Walter Roberson 2017 年 6 月 6 日
I have a step function plot in matlab. I want to reverse the y axis so that the initial value is at the top and also the x axis start from that point only.

採用された回答

Walter Roberson
Walter Roberson 2017 年 6 月 6 日
set(gca, 'YDir', 'reverse')
  2 件のコメント
Nidhi SRIVASTAVA
Nidhi SRIVASTAVA 2017 年 6 月 6 日
Thank you for your answer. I have used stairs for my code to make step function. Could you please suggest me any other way to make step function with the y axis reversed? Thanks
Walter Roberson
Walter Roberson 2017 年 6 月 6 日
  • You could adjust the axes CameraPosition and CameraTarget so that you are looking at the scene from "below" so that the axes is reversed from the normal
  • You could create a hggroup() that you parent your stairs plot in, and then use hgtransform() to reverse top and bottom for it
  • Instead of stairs(Y) you could stairs(SomeConstant - Y)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by