Scatter plot colour control of YTickLabel
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I can control the colour of a Y axis but does anybody know how to control the colour of individual tick labels so that there are three different colours, one for each of the ticks to match my data which is plotted on the graph as red, green and blue:
axes1 = axes('Parent',figure1,...
'XTickLabel',{'-6','-4','-2','0','2','4','6'},...
'XTick',[-6 -4 -2 0 2 4 6],...
'XGrid','on',...
'XColor',[0 0 0],...
'Position',[0.1907 0.8117 0.627394 0.0597],...
'YTick',[1,2,3],...
'YTickLabel',{'Sagittal','Coronal','Axial'},...
'YColor',[0 0 0]);
Thanks.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 14 Aug. 2011
The control of tick colors is not related to the kind of plot you do.
The mechanisms supplied in MATLAB only have the YColor that you already found.
Beyond that, you need to draw the ticks yourself.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Axes Appearance finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!