Why can't I define separate tick mark labels using pipes in MATLAB R2014b?

1 Ansicht (letzte 30 Tage)

Akzeptierte Antwort

MathWorks Support Team
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'};

Weitere Antworten (0)

Produkte


Version

R2014b

Community Treasure Hunt

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

Start Hunting!

Translated by