Changing the x,y axis values
Mostrar comentarios más antiguos
Hi,
I have a figure of an image showing the pixel number in the x- and y-axis. I would like to display this in angle mrad instead. I know the angle size of one pixel from knowing the pizel size and the distance to light source.
How do I display the angle mrad, 0, 0.5, 1,5 etc in the axes instead of the pixel numbers 1, 2, 3?
Using 'image' to plot the image.
1 comentario
Respuesta aceptada
Más respuestas (1)
Vinny Chandran Suja
el 14 de Jun. de 2020
From the handle to the image, eg:
hIm = image(myImage );
It is possible to access the handles of the axes by invoking,
hIm.Parent
The above axes handle can be used to redefine the ticks and ticklabels. For eg. the Yticklabels can be changed as,
hIm.Parent.YTickLabel = {'0', '0.5', '1', '1.5'};
Categorías
Más información sobre Image Arithmetic en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!