Matlab App Designer UIAxes same scale for x and y axis

60 ビュー (過去 30 日間)
Ermanno Manca
Ermanno Manca 2020 年 6 月 23 日
コメント済み: Adam Danz 2020 年 6 月 24 日
Hi I'm looking for a command to have the same scale for x and y axis in my app.UIAxis plot.
unfortuantely set(gca,'DataAspectRatio',[10 1 1]) doesn't work since it opens a new figure instead of changing the axis scale in my plot.
Thanks a lot and best regards.

採用された回答

Adam Danz
Adam Danz 2020 年 6 月 23 日
編集済み: Adam Danz 2020 年 6 月 23 日
Check out linkaxes and linkprop. Use them to set the axis limits and, if needed, other axis properties between two axes.
The reason why your set() command didn't work is because you need to specify the axis handle.
set(app.UIAxes,'DataAspectRatio',[10 1 1])
% ^^^^^^^^^^ or whatever your axis handle is
  2 件のコメント
Ermanno Manca
Ermanno Manca 2020 年 6 月 24 日
Thanks, you really helped me out !
Adam Danz
Adam Danz 2020 年 6 月 24 日
Happy to hear that!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGrid Lines, Tick Values, and Labels についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by