How do I reverse the y axis label on a graph?

16 Ansichten (letzte 30 Tage)
Sara
Sara am 21 Sep. 2017
Kommentiert: Walter Roberson am 21 Sep. 2017
I have multiple things plotting on one graph and have one of the axes on the right side and the other two on the left. I would like to reverse the order of the right side label only. I do not want to reverse the axis. Is there a way to do this? Thanks!

Antworten (1)

Walter Roberson
Walter Roberson am 21 Sep. 2017
ax = gca;
xt = get(ax, 'xtick');
xtl = get(ax, 'xticklabel');
mask = xt > 0;
xtl(mask) = fliplr( xtl(mask) );
set(ax, 'xticklabel', xtl)
  4 Kommentare
Sara
Sara am 21 Sep. 2017
That just flipped each individual letter. I'll just deal with it. Thanks.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Labels and Annotations finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by