How To Change Color Of Axis Tick Marks
19 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jesse Abruzzo
le 23 Mar 2016
Commenté : Walter Roberson
le 1 Avr 2016
Hello all i am currently trying to change the color of the tick marks on my axis from black to yellow. I tried changing directly through the 'GUIDE' interface and that didnt work. So i tried using code which was this:
set(handles.axes4,'XColor','y'); set(handles.axes4,'YColor','y');
And it still didnt work so im kinda at a loss here. Any help would be apprecaited thanks!
2 commentaires
Réponse acceptée
Walter Roberson
le 23 Mar 2016
In R2014a and before, there is no mechanism provided that would allow you to easily set the tick mark colors to something different than the box color. In order to have them a different color you will need to draw the tick marks in yourself, or find code that can do it for you. Possibly the File Exchange contribution plt() might have this feature available.
As of R2014b this changed, but R2014b itself the mechanism was not finalized. R2015a finalized the method, but even that is not as flexible as one might prefer; see http://www.mathworks.com/help/matlab/ref/numericruler-properties.html for R2015a onward.
8 commentaires
Walter Roberson
le 1 Avr 2016
I would not expect that but it could be a bug.
The workaround would be not to call axes() that way. Instead, pass the axes handle as a parameter to graphics operations. Most graphics routines accept an axes as the first parameter but not all do, and the rest typically accept a 'Parent' name value pair. The ones that do not accept that either probably ignore the current axes anyhow.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Graphics Performance 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!