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

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

node.js - Using Node without global install -

java - JavaScript + Thymeleaf - select onchange -