Copy all features of a figure inside a subplot for print multiple images in a single page pdf
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi everybody... There is a way to copy one figure with ALL its features inside a subplot? Let me explain my problem: i'm plotting a series of graphs which i have to print in a pdf file in scale 1:1... At now, i obtained that with this code:
fig = figure(1);
plot(.....)
hold on
grid on
plot(.....)
axis equal
axis off
set(gca, 'Position',[0 0 1 1])
axis([...]) %Axis Limit
fig_height=Value;
fig_width=Value;
set(gcf,'Units','centimeters','position',[0 0 fig_width fig_height])
set(gcf, 'PaperPositionMode','auto')
print(fig,'FileName','-dpdf','-r300')
This code works properly for printing a single figure on pdf, but i'm searching a way to put multiple figure in a single page pdf and i thought about using subplots. I've tried to use copyobj but some property of the figure doesn't been copied. I've tried also to manualy copy the each plot code after the subplot command but i'll not obtain a subplot but a normal single figure... I hope someone can help me!!!
PS: if someone would suggest me another way to print multiple figure on a single page pdf will be appreciated too!!!
0 comentarios
Respuestas (1)
Walter Roberson
el 7 de Oct. de 2016
No, it is not possible in the general case. In the general case, figures include menu bars, uipanels, uitabgroups, and uicontrols, none of which can be placed inside of axes objects (subplots are axes objects.) Also, for R2014a and earlier, colorbar() and legend() are implemented as axes, and axes cannot be placed inside axes. IN R2014b and later, colorbar and legend are not implemented as axes, but they cannot be parented to an axes either (needs to be a container object such as a figure or uipanel.)
Have you investigated the possibility of using the File Exchange contribution export_fig() which includes a routine to append multiple files into a pdf?
2 comentarios
Ver también
Categorías
Más información sobre Subplots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!