show an image in the center of the axes
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I have a fixed axes in a GUI (position: [517 125 283 459]). I'm showing an image in this axes:
axes(handles.imagenanatomica) imshow(imagen,[]) or imshow(imagen,'parent',handles.imagenanatomica).
The 'imshow' function shows the image smaller than the axes'size so as to not deform the image. Here I have two questions:
1) The image is not in the center of the axes, it appears at the top-left of the axes.¿Is it possible to center the image in the axes?
2) Is it posiible to show the image bigger?. I mean, not as the size of the axes but a bit bigger than it appears.
Thank you very much.
Silvia
0 comentarios
Respuestas (1)
Image Analyst
el 5 de Jul. de 2013
1) imshow() automatically tries to fit the image into the existing space allocated from the axes. It will scale it down, maintaining the aspect ratio if it has to, in order to get it to fit.
2) You can use the InitialMagnification option of imshow to override the fitting functionality. For example 'InitialMagnification', 800 will make each pixel 8 pixels. I believe this will give scroll bars or a hand cursor so you can pan/scroll the image.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!