Turning y axis upside down in MATLAB
The ‘YDir’ axes property can be either ‘normal’ or ‘reverse’. By default it is ‘normal’ for most plots, but some plots will automatically change it to ‘reverse’, such as the image or imagesc functions. You can set the y-axis direction of an axes with either the set function or dot indexing (in newer MATLAB versions): … Read more