Setting default Figure font, different from Desktop

39 visualizaciones (últimos 30 días)
Travis
Travis el 11 de Mzo. de 2013
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?

Respuestas (1)

Daniel Shub
Daniel Shub el 11 de Mzo. de 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

Categorías

Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by