Font Unit property in R2015a

2 次查看(过去 30 天)
Patrick
Patrick 2015-6-10
Dear all
I used to have statements in my startup file to set default font property for axes
set(h,'DefaultAxesFontName','times');
set(h,'DefaultAxesFontWeight','normal');
set(h,'DefaultAxesFontSize',14);
Since I installed R2015a all the fonts (axes, text, legend) are smaller, also when generating eps file.
Does anyone know whether something changed in the R2015a release regarding fonts size/unit?
Regards,
Patrick

回答(1 个)

Sreeja Banerjee
Sreeja Banerjee 2015-6-11
Hi Patrick,
You have mentioned that in the start up file you have added the commands:
>> set(h,'DefaultAxesFontName','times');
>> set(h,'DefaultAxesFontWeight','normal');
>> set(h,'DefaultAxesFontSize',14);
Is the handle "h" also defined in the startup.m file? If not, this should result in an error message "Undefined function or variable 'h'." and the default values will not be set. If the handle is defined then
The correct method of setting the values is to set the graphics root in the startup file. For R2014a and older versions the h has to be replaced by 0. For example:
>> set(0,'DefaultAxesFontSize',14);
And for R2014b and newer versions, it is:
>> set(groot,'DefaultAxesFontSize',14);
Please note that even though "groot" is recommended, if you pass 0 then also it should work in R2014b and later versions.
If the default values are set correctly, then there should not be a major difference in the Font Size in the two versions. However, new axes properties have been added for controlling the title and axis label font sizes in the new MATLAB graphics system introduced in Release 2014b. For example, TitleFontSizeMultiplier, and LabelFontSizeMultiplier properties.
The new MATLAB graphics system introduced in Release 2014b is built on an improved infrastructure and supports most of the functionality of previous releases, although there are some differences. Please look at the following links for more information:

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by