Setting default Figure font, different from Desktop

26 views (last 30 days)
I'm trying to set the default figure font independent of the desktop font, however this doesn't seem to be possible in the 'preferences' section. Is it possible to set the desktop font to Helvetica, while setting the default figure fonts to Arial?

Answers (1)

Daniel Shub
Daniel Shub on 11 Mar 2013
There is a nice blog post about this over at undocumentedmatlab. Basically you do
set(0, 'DefaultAxesFontName', 'Arial');
set(0, 'DefaultTextFontName', 'Arial');
You can add this to your startup.m, but it is a little dangerous. I would suggest limiting the effects to a single figure at a time.
figure;
set(gcf, 'DefaultAxesFontName', 'Arial');
set(gcf, 'DefaultTextFontName', 'Arial');
You could create your own function
function h = arialfigure
h = figure;
set(h, 'DefaultAxesFontName', 'Arial');
set(h, 'DefaultTextFontName', 'Arial');
end

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!