MATLAB: Is it possible to show the x,y axis values for an image

axisimageimage processingImage Processing Toolboximshow

I m trying to use an image from matlab in a paper, but I want to show the x,y axis. However when you use imshow(myImage); it doesn't show the values on the x,y axis. i.e. these are coordinates of the pixels. How do I display this?

Best Answer

Get the handle of the axis and set the 'Visible' property to 'on'
imshow('peppers.png');
h = gca;
h.Visible = 'On';