MATLAB: Change default figure properties

figure

Is there any way to change the default figure properties in MATLAB?
For example, I want all my figures to have a certain axis font size, background color, xlabel/ylabel font size, and line width. Nothing fancy, just want to change some basic default settings.
I know how to do this for each individual plot in my scripts. However, I am generating several different types of plots (plot, hist, surf, etc) and a lot of them from several different scripts.
Thanks for any help with this.

Best Answer

I don't know if there's a way to change the defaults, but you'll save a lot of work if you create a function to apply your 'default' settings to any supplied figure. Pass in a handle to that figure.
function = SetFigureDefaults( f )
% Put all your common code in here
end
That will make your code a whole lot more readable. You can hide this function in your script so that it's not visible to the outside world. That way you can take advantage of this approach in many other scripts without getting confused.