How to change axis color in matlab?

2 views (last 30 days)
Demeter Andreea
Demeter Andreea on 14 Aug 2019
Commented: dpb on 14 Aug 2019
Hello again!
Can someone help me with a problem please? How to change axis color in matlab for this code:
Im = imread('4.png');
AxesH = axes('units','pixels','position', [320, 80, 290, 330], 'Visible', 'off');
image(Im, 'Parent', AxesH);
  2 Comments
Demeter Andreea
Demeter Andreea on 14 Aug 2019
I already got the answer, thanks anyway guys :*
Put this after the code:
ax = gca;
ax.XColor = 'r'; % Red
ax.YColor = 'b'; % Blue
dpb
dpb on 14 Aug 2019
For future reference, there's a link to axes properties in the documentation for Axes that will let you find all exposed properties.
Or, if you just type ax. at the command line, the auto-complete box will pop up and give you a list of properties from which to choose...

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!