Mirror about Y axis

5 vues (au cours des 30 derniers jours)
juan sanchez
juan sanchez le 11 Mai 2022
Commenté : juan sanchez le 11 Mai 2022
How can I plot this axis to the mirror about the y axis and x axis pointing the opposite direction? Thank you.
a = [1 2 3 4 5 6 7 8 9 10 11 12 13 14];
b = [1 2 3 4 5 6 7 8 9 10 11 12 13 14];
plot (a, b,'.')

Réponse acceptée

DGM
DGM le 11 Mai 2022
Something like this:
a = [1 2 3 4 5 6 7 8 9 10 11 12 13 14];
b = [1 2 3 4 5 6 7 8 9 10 11 12 13 14];
plot(a,b);
hax = gca;
hax.XDir = 'reverse'; % flip axis direction
hax.YAxisLocation = 'right'; % move ticks & labels to the other side
  1 commentaire
juan sanchez
juan sanchez le 11 Mai 2022
Thank you very much. This is very helpful.

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

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by