Exporting a figure containing subplots to pdf in exact dimensions
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!