It is ugly to take a screenshot from matlab figure directly because of the grey background. Sometimes I wanna change it to white and look more harmonious.
In matlatb, we could use following command to change the figure properties:
However, it can only work for single figure. If you want to set it to default, you may need:
And then, it works. But when you restart the matlab, you need to type the command again. Is there any to run some command at start up automatically? Of course.
The first choice is to use
-r option in terminal(if you under LINUX), just like this:
matlab -r 'set(0,'defaultfigurecolor','w');'
The second choice is to add personal command content to matlatb start up file, such as
matlabroot/toolbox/local/matlabrc.m, just add it at the file’s ending(It is a write protectly file, you should be careful)