Problem of saving .fig file as .pdf file

Hi, everyone
I need to save .fig file as .pdf file. Previously, I used command
set(gcf,'PaperOrientation','landscape'); set(gcf,'PaperUnits','centimeters'); set(gcf,'PaperPositionMode','auto'); set(gcf,'PaperPosition', [0 0 1 1]); saveas(gcf, 'test', 'pdf');
and it worked fine. However, when I updated my MATLAB to 2014b and 2015a, all numbers on y-axis of .pdf file are overlapped with the edge of the diagram
Is there any way I can fix it?

回答 (1 件)

Ming
Ming 2015 年 3 月 19 日

0 投票

does anyone know?

7 件のコメント

Richard Quist
Richard Quist 2015 年 3 月 21 日
I'm not sure - but one thing that looks strange to me is the line of code that sets the PaperPosition:
set(gcf,'PaperPosition', [0 0 1 1]);
Did you really mean to make the figure 1cm x 1cm on the output page?
I'd suggest removing that line and see if that makes a difference
Ming
Ming 2015 年 3 月 22 日
Hi,
Thank you for your replying, I tried to remove line, but the numbers still overlap with the axis, I got this problem since 2014b
Richard Quist
Richard Quist 2015 年 3 月 23 日
I think we'll need to see a more complete example in order to understand what is happening. Can you post one?
Ming
Ming 2015 年 3 月 23 日
thanks Richard, do you want me to send the .fig file to you?
Richard Quist
Richard Quist 2015 年 3 月 24 日
If the code doesn't involve anything proprietary/confidential I'd suggest posting it here and, if necessary, attaching any data files required. That gives others a chance to weigh in with alternative suggestions/answers.
Ming
Ming 2015 年 3 月 30 日
Hi, I finally found the problem, it is the font I used for the numbers on y-axis, if use the default font "Helvetica", it will be fine, if use font "Calibri" all numbers on y-axis of .pdf file will be overlapped with the edge of the diagram.
Jan
Jan 2015 年 3 月 30 日
Please do not bump your question by posting pseudo-answers. And please do not post answers as comments. Thanks.

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

カテゴリ

ヘルプ センター および File ExchangeEnvironment and Settings についてさらに検索

製品

質問済み:

2015 年 3 月 19 日

コメント済み:

Jan
2015 年 3 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by