How to undo axis(gca,'image')

I use imagesc to show a demo:
imagesc % a photo shows, with blank on top, stretchable by the resize of the window
axis(gca,'image')% the photo is locked to 1:1 pixel size and the axe limit fix to the entire image, not stretchable even resize the window
axis(gca,'auto')% the blank on top come back, but no longer stretchable by the resize of the window
Is there a way to reset to the initial version that stretchable?

 Respuesta aceptada

Voss
Voss el 16 de Nov. de 2023

0 votos

set(gca,'DataAspectRatioMode','auto')

Más respuestas (0)

Categorías

Más información sobre Read, Write, and Modify Image en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 16 de Nov. de 2023

Respondida:

el 16 de Nov. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by