tick labels in Matlab 2015a
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
My institution has recently updated to Matlab 2015a (from 2014a), and I'm struggling with the new graphics. I have a code where x is a vector of some numbers say: x=1:5; Then I create a string variable as follows: xt='one|two|three|four|five'; Finally I use: set(gca,'xtick',xt); set(gca,'xticklabel',xtl);
Now in previous versions of Matlab this produced ticks and numbers one to 5, and ticklabels with the nrs written out (i.e. 'one' at 1, 'two' at two etc.). In the new Matlab I get the entire string (i.e. 'one|two|three...') at each tickmark. How do I adjust my code to get the old tickmarks back.
0 Commenti
Risposta accettata
KSSV
il 11 Mar 2016
k = rand(5,1) ;
plot(k)
xt={'one' ; 'two' ; 'three' ; 'four' ; 'five'} ;
set(gca,'xtick',1:5);
set(gca,'xticklabel',xt);
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Axis Labels in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!