Matlab App Designer UIAxes same scale for x and y axis

조회 수: 87 (최근 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 CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by