axis control in Image plot

7 vues (au cours des 30 derniers jours)
Namira
Namira le 2 Juil 2018
Commenté : Namira le 2 Juil 2018
Hi, I am trying to understand image plot. When I run this example
x = [1 5];
y = [1 5];
C = [0 2 4 6; 8 10 12 14; 16 18 20 22];
imagesc(x,y,C)
I get the figure (attached here).
In Y axis its comes in descending order. I want to get it in Ascending order. How can I control the axis range?

Réponse acceptée

KSSV
KSSV le 2 Juil 2018
x = [1 5];
y = [1 5];
C = [0 2 4 6; 8 10 12 14; 16 18 20 22];
figure
h1 = axes ;
imagesc(x,y,C) ;
set(h1,'YDir','normal');
  1 commentaire
Namira
Namira le 2 Juil 2018
Thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Graphics Object Properties dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by