How can I set ">> axis image" as default (for all images/figures I will ever create)

Hello, I can't find the answer to my question, so I am asking here: When I set
>>axis image
or
>>set(gca,'DataAspectRatio',[1 1 1])
I change the DataAspectRatio from "Default to "Manual", the "stretch-to-fill" behaviour is disabled and I get the result I want. How can I set these preferences as default, something like:
>>set(0,'DefaultAxisDataAspectRatio',[1 1 1])
or
>>set(groot,'DefaultAxisDataAspectRatio',[1 1 1])
?
Thank you for helping, DB

Respuestas (1)

The second of those options should work:
set( groot, 'DefaultAxisDataAspectRatio', [1 1 1] )
but I think you also need to set
set( groot, 'DefaultDataAspectRatioMode', 'manual' )
I've never set these defaults myself, but I seem to remember a similar question in the past where it turned out you had to explicitly set the mode to manual for that to work.

1 comentario

Thank you for your reply but in both cases, Matlab tells me that
"axisdataaspectratio(-mode) is an invalid class name"
...

Iniciar sesión para comentar.

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Preguntada:

el 27 de Abr. de 2015

Comentada:

el 27 de Abr. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by