Scatter plot colour control of YTickLabel
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuesta aceptada
Walter Roberson
el 14 de Ag. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Axes Appearance en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!