MATLAB: How to flip the axis when plotting with IMAGESC

MATLAB

For example:
load clown
imagesc(X)
colormap(map)
Instead of the y-axis increasing from top to bottom, I would like to have it decreasing from top to bottom.

Best Answer

After displaying an image with the IMAGESC function, you can change the axis so it is decreasing from top to bottom. For example,
load clown
X = flipud(X);
imagesc(X)
colormap(map)
axis('xy')