How to reverse the direction of Y-Axis of MatLab figure generated by `imagesc()` function -
i trying display data in matrix using imagesc()
function showing row index in decreasing order (assuming origin @ left-bottom). idea mistake making or how correct this?
the matrix has zeros , ones in it.
set ydir
property of current axes
normal
by default, imagesc
uses reverse
ydir
set(gca,'ydir','normal');
see documentation axes properties
before:
after:
note: flips inside data (it supposed to). dealing matrices, hope want.
if don't want affect inside data, need change order of
yticklabels
instead.
Comments
Post a Comment