print to pdf always give portirait figure

1 回表示 (過去 30 日間)
AJ1
AJ1 2016 年 3 月 31 日
コメント済み: AJ1 2016 年 5 月 1 日
Hi Folks
I am using matlab to create plots and for publication, and these plots need to be in vector format with custom fonts like calibri. I have the following code:
mf=figure;
mf_sx=8;
mf_sy=5;
set(mf,'PaperUnits','centimeters');
set(mf,'PaperSize',[mf_sx mf_sy]);
set(mf,'PaperPosition',[0 0 mf_sx mf_sy]);
set(mf,'renderer','Painters')
plot(0:.01,2*pi,sin(0:.01,2*pi))
print(mf,'PAdobe PDF')
This works like charm in matlab 2012, giving very nice font quality and consistent fonts and every thing. But now in the 2015b version, I get the printed paper is always Portrait format, the longer side is always the height of the paper and the actual drawing is clipped! Any body else experiencing this problem or any clue why this is the case now?
BTW, I have tried savefig and export_fig from file exchange and they are no good for a lot of reasons.
  2 件のコメント
KSSV
KSSV 2016 年 4 月 1 日
AJ1
AJ1 2016 年 4 月 4 日
There are a lot of draw back for using export_fig as I mentioned in the end of my post. I have got to have a lot of dependencies installed and at the end the results are not that impressive either!

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

回答 (2 件)

Dave Behera
Dave Behera 2016 年 4 月 4 日
Did you try setting the PaperOrientation property to force 'landscape' mode?:
  1 件のコメント
AJ1
AJ1 2016 年 4 月 4 日
Yes, I did, and it did not do any good unfortunately :(

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


Anand Patel
Anand Patel 2016 年 4 月 27 日
You can try to set orientation to 'landscape' before setting paper related properties. It'll give you output without clipping, and to view landscape mode, you can rotate page in pdf viewer.
mf=figure;
mf_sx=8;
mf_sy=5;
set(mf, 'PaperOrientation', 'landscape');
set(mf,'PaperUnits','centimeters');
set(mf,'PaperSize',[mf_sx mf_sy]);
set(mf,'PaperPosition',[0 0 mf_sx mf_sy]);
set(mf,'renderer','Painters')
plot((rand(3));
print(mf,'-PAdobe PDF')
  1 件のコメント
AJ1
AJ1 2016 年 5 月 1 日
Thanks for your reply. I also got as far. But, obviously I use these PDfs in publications and stuff and it is unacceptable that the PDF be 90 degrees rotated compared to what it needs to be!

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

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by