Effacer les filtres
Effacer les filtres

axis X special type

1 vue (au cours des 30 derniers jours)
Matus
Matus le 23 Avr 2013
Hello,
I would like to construct a graph which has the axis x with values arranged 3, 2, 1, 0, 1, 2, 3, ... (normally, it would be -3 -2 -1 0 1 2 3 .. but I need it as mentioned above). Can anyone help me?
Thank you.

Réponse acceptée

the cyclist
the cyclist le 23 Avr 2013
Modifié(e) : the cyclist le 23 Avr 2013
Here's one way.
figure
plot(-3:3,1:7,'.-')
set(gca,'XTickLabel',[3 2 1 0 1 2 3])
Note that I have only changed the label of the axis, but not the values of the plotted points themselves, which still have x values running from -3 to 3.
  1 commentaire
Matus
Matus le 23 Avr 2013
ok, thank you, it's useful for me.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots 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