MATLAB: Plotting Image arrays with Imagesc flips them vertically.

graphicsimagesc

I have an image contained in an array with (1,1) being in the top left corner. When using imagesc the image flips vertically and the y axis plots from 0-num starting from the bottom. Is there a way I can prevent the image from flipping and have the y-axis count from the top left down?

Best Answer

It should work correctly. If it doesn't then perhaps the direction got reversed. You can either put
cla reset;
before you call imagesc(), or reverse the direction afterwards
axis ij;