How to set map axes default FontName

4 ビュー (過去 30 日間)
Selene Fregosi
Selene Fregosi 2020 年 5 月 10 日
コメント済み: Selene Fregosi 2020 年 5 月 13 日
Is there a way to change the default font for map axes, similar to how the default axes font can be set for regular figures?
set(groot, 'defaultAxesFontName', 'MyriadPro-Regular')
set(groot, 'defaultTextFontName', 'MyriadPro-Regular')
I use the above in my startup.m file to change my default axes font so I can open Matlab figures exported as .eps properly in Adobe Illustrator. This works for "regular" figures, but does not seem to work for map axes. Is there a similar way to set the default for map axes?

回答 (1 件)

Ankriti Sachan
Ankriti Sachan 2020 年 5 月 13 日
You can probably try ‘FontName’ property of axes (More properties can be found here - https://www.mathworks.com/help/matlab/ref/matlab.graphics.axis.axes-properties.html#d120e52573).
To set the FontName for the axes, it looks like you have to set it for each axes independently. You can refer to this answer - https://www.mathworks.com/matlabcentral/answers/416445-i-can-t-get-the-correct-figure-font-name#answer_334317.
  1 件のコメント
Selene Fregosi
Selene Fregosi 2020 年 5 月 13 日
Yes I'm able to do it using the 'FontName' property when I create the map axes like this:
ax1 = axesm('mercator', 'MapLatLim', latlim, 'MapLonLim', lonlim, 'Frame', 'on', 'FontName', fontName);
But I was wondering if there was a way to change the default. I always want to use 'MyriadPro-Regular' because that is compatible with Adobe Illustrator, so I'd like to set that globally for all map axes I create in the future.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGeographic Plots についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by