Because of this discrepancy, there is always confusion when drawing images, especially in Matlab (e.g.
imagesc
). While one possibility would be to flip the data array via flipud
, my preferred method is to use the 'ydir'
option.
set(gca, 'ydir', 'normal');
This leaves the data as is, no flipping data, and only changes the the plot options, which separates data from presentation. (Model/View) An interesting point is that the default value for
ydir
is 'reverse'
which is the default direction of most graphics packages.