Printing Axes
Show older comments
Hi everybody
I have 8 axes in my gui . How can i print three of them ? 'print' function is print all figure window. I don't want to print all of figure.
Thanks for help...
Accepted Answer
More Answers (1)
Daniel Shub
on 21 Jul 2011
Printing each subplot/axes as a separate figure is easier than printing a subset of the axes in one figure. Start with a dummy figure making sure you remember the handle to the axis you want to print:
figure;
subplot(2,2,1);
plot(1:10);
hax = subplot(2,2,2);
plot(1:5);
Make a new figure, copy the axis to it, scale the axis to be the "full" size, and print it.
hfig = figure;
hax_new = copyobj(hax, hfig);
set(hax_new, 'Position', get(0, 'DefaultAxesPosition'));
print(hfig);
You can copy multiple axes in on go, but positioning them nicely in the figure is more difficult.
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!