Increase figure size on the screen but save with specific dimension in centimeters

91 ビュー (過去 30 日間)
FHEPCH92
FHEPCH92 2022 年 12 月 6 日
コメント済み: Jan 2022 年 12 月 8 日
Hi all,
I'm typically save figures in .eps format with specific size (let's say 8.6*cm x 5*cm, as typically for scientific formatting).
Although this dimension is perfect for me to be integrated in LaTeX, the dimension on the sceen is too small.
Should I just increase the dpi for the screen rendering?
This is what I use at the moment:
fig=figure('units','centimeters');
set(gca,'fontname','Latin Modern Math');
fig.Units = 'centimeters';
fig.Position(3) = 8.6;
fig.Position(4) = 4;

回答 (1 件)

Jan
Jan 2022 年 12 月 6 日
Figures have the properties 'Position', which defines the size on the screen, and 'PaperPosition' and 'PaperSize', which determines the output for printing. You can set the size dynamically also during the printing.
  2 件のコメント
FHEPCH92
FHEPCH92 2022 年 12 月 7 日
編集済み: FHEPCH92 2022 年 12 月 7 日
I see, but in this way I have to manually edit all the markersize and font for both representations right? Because if I leave fontsize and markersize of the figure for a correct visualization, everything gets messed up on the eps version.
I tried these settings, but it prints the output as I see on screen.
fig.Position(3) = 28;
fig.Position(4) = 26;
fig.PaperPosition(3) = 8;
fig.PaperPosition(4) = 6;
fig.PaperSize(1) = 8;
fig.PaperSize(2) = 6;
exportgraphics(fig,'3Dtest.pdf','ContentType','vector')
Jan
Jan 2022 年 12 月 8 日
I keep my figure units in pixels, because this is handy on the screen.
For fhe paperunits I use cm and have no problems with exporting EPS or PDF graphics.

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

カテゴリ

Help Center および File ExchangePrinting and Saving についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by