Matlab App Designer UIAxes same scale for x and y axis

60 visualizaciones (últimos 30 días)
Ermanno Manca
Ermanno Manca el 23 de Jun. de 2020
Comentada: Adam Danz el 24 de Jun. de 2020
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.

Respuesta aceptada

Adam Danz
Adam Danz el 23 de Jun. de 2020
Editada: Adam Danz el 23 de Jun. de 2020
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 comentarios
Ermanno Manca
Ermanno Manca el 24 de Jun. de 2020
Thanks, you really helped me out !
Adam Danz
Adam Danz el 24 de Jun. de 2020
Happy to hear that!

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by