How do I reverse the y axis label on a graph?
Mostra commenti meno recenti
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!
Risposte (1)
Walter Roberson
il 21 Set 2017
ax = gca;
xt = get(ax, 'xtick');
xtl = get(ax, 'xticklabel');
mask = xt > 0;
xtl(mask) = fliplr( xtl(mask) );
set(ax, 'xticklabel', xtl)
4 Commenti
Sara
il 21 Set 2017
Walter Roberson
il 21 Set 2017
ylabel( flipr('Y-axis') )
?
Sara
il 21 Set 2017
Categorie
Scopri di più su Environment and Settings in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!