How to change tick mark color on image plot.
Mostrar comentarios más antiguos
Hello,
I have a .jpg image that is plotted via image(). I need to have the tick marks inward with 'white' color. I'm able to change the tick marks to inward, but I'm unable to show the tick marks color in 'white'. If I have the tick mark outward, I can see the 'white' tick mark, when I have the tick mark inward, all tick marks just disappeared in the background color of the image. I searched and could not find a solution. May someone please help?
Thank you!
1 comentario
Walter Roberson
el 21 de Jun. de 2011
I know I've solved the opposite of this problem, where someone needed tick marks covered up; unfortunately I cannot think of the proper keywords to find that newsreader posting now.
Respuesta aceptada
Más respuestas (2)
the cyclist
el 21 de Jun. de 2011
The following command will change of the color of the x-axis tick marks and labels:
>> set(gca,'XColor',[1 1 1]); % Set RGB value to what you want
5 comentarios
Yonghe
el 21 de Jun. de 2011
the cyclist
el 21 de Jun. de 2011
>> load spine
>> image(X)
>> set(gca,'TickDir','in'); % Were already inward, but just to be sure
>> set(gca,'XColor',[1 1 1])
works for me. But you might consider Walter's idea instead.
Valerii Abramenko
el 9 de Feb. de 2018
Thanks a lot. So simple solution. It's very helpful when using double axis.
Hernan Larriva
el 11 de Sept. de 2019
Thanks a lot! Best regards from Barcelona-Spain
Edney Almeida Nascimento
el 29 de En. de 2021
Thanks bro, it's work for me.
$ yyaxis left
$ set(gca,'YColor','#080808'); % put hexa color code. (Matlab 2019a)
Walter Roberson
el 21 de Jun. de 2011
0 votos
Consider using the MATLAB File Exchange contribution plt -- if it does not have an option for this, then you should be able to modify the code to handle it.
Categorías
Más información sobre Display and Exploration en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!