Scatter plot colour control of YTickLabel

2 次查看(过去 30 天)
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.

采纳的回答

Walter Roberson
Walter Roberson 2011-8-14
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 个)

类别

Help CenterFile Exchange 中查找有关 Scatter Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by