Clear Filters
Clear Filters

Exporting matlab figure to word with defined font

8 views (last 30 days)
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

Answers (1)

Mann Baidi
Mann Baidi on 28 Oct 2023
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!

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!