How do I make the default gray figure background into white?

116 views (last 30 days)
I'd like to change my default factory setting so that all figures I will ever make will appear on a white background, instead of the current default gray background. (I'm talking about the color of the background outside the actual figure).
It is similar to this question, except that I tried the answer to this question and it does not work: http://www.mathworks.com/matlabcentral/answers/96816-how-do-i-change-the-default-background-color-of-all-figure-objects-created-in-matlab
Thanks in advance
  3 Comments
L
L on 18 Oct 2014
Edited: L on 18 Oct 2014
Thanks, what I mean by it doesn't work:
The command does work in the short term. But, once you close the session and reopen it, then the default appears again. I'm using 2012a, so maybe that might be the issue.
Mariam Azam
Mariam Azam on 17 Feb 2019
Edited: Mariam Azam on 17 Feb 2019
For Simulink:
Diagram >Format > Canvas >White

Sign in to comment.

Answers (2)

Image Analyst
Image Analyst on 18 Oct 2014
Try this:
set(0,'defaultfigurecolor',[.4 .1 .5])
plot(1:9, 'bo-');
Do you get a purple background behind the plot? I do.
  1 Comment
Image Analyst
Image Analyst on 18 Oct 2014
To get it to happen and be this color session after session, put the code into your startup.m file.

Sign in to comment.


L
L on 18 Oct 2014
Thanks, this works but once I restart Matlab the default is gray again.

Community Treasure Hunt

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

Start Hunting!