Exporting a figure containing subplots to pdf in exact dimensions
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Star Strider
le 26 Mai 2014
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.
Voir également
Catégories
En savoir plus sur Subplots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!