Scatter plot colour control of YTickLabel

4 views (last 30 days)
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.

Accepted Answer

Walter Roberson
Walter Roberson on 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.

More Answers (0)

Categories

Find more on Axes Appearance in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!