필터 지우기
필터 지우기

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 CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by