Why can't I define separate tick mark labels using pipes in MATLAB R2014b?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 7 Okt. 2014
Bearbeitet: MathWorks Support Team
am 8 Okt. 2014
Why can't I define separate tick mark labels using pipes in MATLAB R2014b?
Akzeptierte Antwort
MathWorks Support Team
am 7 Okt. 2014
Starting in MATLAB R2014b, do not use the vertical slash character, |, to separate tick mark labels. MATLAB R2014b interprets the vertical slash character literally and not as a delimiter. For example, this code displays the entire set of labels at each tick mark.
plot(1:10,1:10)
ax = gca;
ax.YTickLabel = 'A|B|C|D|E|F|G|H|I|J';
To define multiple strings for the XTickLabel, YTickLabel, and ZTickLabel axes properties, use a cell array.
plot(1:10,1:10)
ax = gca;
ax.YTickLabel = {'A','B','C','D','E','F','G','H','I','J'};
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!