Scatter plot colour control of YTickLabel

4 vues (au cours des 30 derniers jours)
Stewart Wiseman
Stewart Wiseman le 14 Août 2011
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.

Réponse acceptée

Walter Roberson
Walter Roberson le 14 Août 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.

Plus de réponses (0)

Catégories

En savoir plus sur Axes Appearance 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!

Translated by