フィルターのクリア

Matlab report generator - change of figure font during report generation

3 ビュー (過去 30 日間)
Jakub Devera
Jakub Devera 2022 年 4 月 20 日
コメント済み: Jakub Devera 2024 年 4 月 12 日
I have an issue with processing .fig images in Matlab report generator toolbox. The issue started after Matlab upgrade from 2019b to 2020b and it happens only for some figures.
Figure is transferred to from fig to svg with following code:
figures = openfig(pathToFig,'invisible');
fig = Figure();
fig.SnapshotFormat = 'svg';
tmpname = tempname;
print(gcf, tmpname,'-dsvg','-painters');
formImg = FormalImage([tmpname '.svg']);
formImg.Caption = 'Description'
formImg.Height = '6in';
add(chapter,formImg);
add(chapter,Paragraph());
Figure stored as .fig has normal sans-serif standard font:
But after proccesing using above code, following style appears in PDF
Should I specify some option when I am saving original figure to .fig format? I am confused with this because in 2019b everything was working fine and after upgrade to Matlab 2020b the font has chnaged for some type of charts.
  2 件のコメント
Jacob Scheckman
Jacob Scheckman 2024 年 2 月 21 日
I am having this same issue. Did you ever find a solution?
Jakub Devera
Jakub Devera 2024 年 4 月 12 日
I have added to this line when I am saving figures. I am not sure if it is needed for newer version. I haven't tried to removing it.
set(gca, 'FontName', 'Arial');

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

回答 (0 件)

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by