Can I change axes of existing figure from linear to loglog in Matlab without redrawing all the data?
17 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Erez
le 10 Juil 2014
Modifié(e) : Chad Greene
le 10 Juil 2014
I have a given Matlab figure, but not the original data. Can I change axes of existing figure from linear to loglog in Matlab without redrawing all the data?
0 commentaires
Réponse acceptée
Sean de Wolski
le 10 Juil 2014
set(gca,'XScale','log','YScale','log')
3 commentaires
Chad Greene
le 10 Juil 2014
Modifié(e) : Chad Greene
le 10 Juil 2014
You can change what's printed on the axes to anything you want, regardless of the actual numbers being plotted with xtick and xticklabel.
x=[1 1.5 4];
y=[1 2 3];
plot(x,y)
set(gca,'XTick',[1.1 2 3])
set(gca,'XTickLabel',str2mat('1.00','400','2'))
set(gca,'YTick',y)
set(gca,'YTickLabel',str2mat('1.00','2.00','pants'))
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!