フィルターのクリア

Exporting matlab figure to word with defined font

8 ビュー (過去 30 日間)
Elie Abi Aoun
Elie Abi Aoun 2020 年 7 月 8 日
回答済み: Mann Baidi 2023 年 10 月 28 日
Hello,
i would like to export my matlab figures to word with an Arial font and a size 11.
For this reason I am specifying the following.
width = 3.5; % Width in inches
height = 3.5; % Height in inches
alw = 3; % AxesLineWidth
fsz = 11; % Fontsize
lw = 1; % LineWidth
msz = 10; % MarkerSize
hAx=gca;
set(hAx,'xminorgrid','on','yminorgrid','on')
%The properties we've been using in the figures
set(findall(gcf,'Type','Line'),'LineWidth',lw) % set the default line width to lw
set(findall(gcf,'Type','Line'),'MarkerSize',msz)
set(findall(gcf,'Type','Axes'),'FontSize',fsz)
% Set the default Size for display
set(findall(gcf,'Type','Axes'),'FontName','Arial')
I read on stack exchange that the standard size of matlab figure in word documents should be 3.5"x 3.5" in order to preserve font type and size.
Could someone please inform me whether or not the dimensions are correct?
Thank you in advance.
Elie

回答 (1 件)

Mann Baidi
Mann Baidi 2023 年 10 月 28 日
Hi Elie,
I understand that you would like to export the figure from MATLAB to a word document without any changes in the font type and size.
You can perform this by copying the figure using the following command after running your script.
print -dmeta
Then you can paste the figure you copied in the word document.
This will not disturb the font name and the size of the figure.
Hope this will resolve your issue!

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by