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.

enter image description here

set ydir property of current axes normal

by default, imagesc uses reverse ydir

set(gca,'ydir','normal'); 

see documentation axes properties

before:

enter image description here

after:

enter image description here

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

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -