|
I've always used programmatic means of setting the
properties of figures to match my preferences. However, I
was not happy: I would have liked to change the defaults
that Matlab used for figures and axes. In other words, set
the defaults once, and when you say “figure” you will get
the correct colors, fonts (name, slant, size), tick
directions, marker size, in other words all the settings
will be to your satisfaction.
Here is what I found out would work. It uses undocumented
properties of the root. I put this into a script that I run
when I start Matlab working on a project where I need the
figures to look a certain way:
set(0, ‘DefaultFigureColor’, ‘White’, …
‘DefaultFigurePaperType’, ‘a4letter’, …
‘DefaultAxesColor’, ‘white’, …
‘DefaultAxesDrawmode’, ‘fast’, …
‘DefaultAxesFontUnits’, ‘points’, …
‘DefaultAxesFontSize’, 14, …
‘DefaultAxesFontAngle’, ‘Italic’, …
‘DefaultAxesFontName’, ‘Times’, …
‘DefaultAxesGridLineStyle’, ‘:’, …
‘DefaultAxesInterruptible’, ‘on’, …
‘DefaultAxesLayer’, ‘Bottom’, …
‘DefaultAxesNextPlot’, ‘replace’, …
‘DefaultAxesUnits’, ‘normalized’, …
‘DefaultAxesXcolor’, [0, 0, 0], …
‘DefaultAxesYcolor’, [0, 0, 0], …
‘DefaultAxesZcolor’, [0, 0, 0], …
‘DefaultAxesVisible’, ‘on’, …
‘DefaultLineColor’, ‘Red’, …
‘DefaultLineLineStyle’, ‘-’, …
‘DefaultLineLineWidth’, 2, …
‘DefaultLineMarker’, ‘none’, …
‘DefaultLineMarkerSize’, 8, …
‘DefaultTextColor’, [0, 0, 0], …
‘DefaultTextFontUnits’, ‘Points’, …
‘DefaultTextFontSize’, 14, …
‘DefaultTextFontName’, ‘Times’, …
‘DefaultTextVerticalAlignment’, ‘middle’, …
‘DefaultTextHorizontalAlignment’, ‘left’);
What I would like to check is whether it is a bad idea to
use these undocumented properties, and if so if there is a
better approach out there. Suggestions or comments, anyone?
Regards,
Petr
|