Exporting a figure containing subplots to pdf in exact dimensions

2 ビュー (過去 30 日間)
Soumyadip
Soumyadip 2014 年 5 月 26 日
コメント済み: Soumyadip 2014 年 5 月 26 日
Hi, I have been struggling with this issue for quite a long time. I have this code:-
y = -16.55 : 0.01: 16.55;
xpos = 10.5361 * cos(y/10.5361) * (pi/20);
x = [-xpos,xpos];
y = [y,-y];
a1 = subplot(1,4,1);
fill(x,y,'r');
a2 = subplot(1,4,2);
fill(x,y,'g');
a3 = subplot(1,4,3);
fill(x,y,'o');
a4 = subplot(1,4,4);
fill(x,y,'w');
set(a1,'Units','centimeters','Position',[0 0 5 36]);
set(a2,'Units','centimeters','Position',[5.5 0 5 36]);
set(a3,'Units','centimeters','Position',[11 0 5 36]);
set(a4,'Units','centimeters','Position',[16.5 0 5 36]);
I want to export this whole figure to pdf (including the part not visible on screen) in exact dimensions but what is appearing in the pdf is only the part visible on the screen. I checked out this link but this is not working with subplots. Please help.

回答 (1 件)

Star Strider
Star Strider 2014 年 5 月 26 日
Experiment with the 'OuterPosition', 'PaperPosition', and other Figure Properties. They seemed a partial solution, but since I don’t know exactly what you want, I will leave you to find the optimal settings for them.
  1 件のコメント
Soumyadip
Soumyadip 2014 年 5 月 26 日
I just want the entire plot printed in same dimensions, i.e, it should be of length 33.1(2 x 16.55) cm and width as calculated from the equation. Any method would do.

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by