How to "print" on the command line or from a gui like is done from the figure "file" menu option
Show older comments
Hello,
To simplify life, I would like to have a button in my gui call up the same MATLAB gui window to choose the printer that is done when you choose "File Print" in Windows. I don't want a new figure window (if possible) to pop up, but just to print the chosen axes (chosen through copyobj()).
The print procedure is NOT very intuitive.
Thanks.
Doug
12 Comments
Jan
on 1 Apr 2014
I do not understand the question. While the print command is powerful and does exactly what is useful for printing, I do not understand, how copyobj "chooses" an axes or where you choose "File Print".
What do you want to print and which problem occurs?
Joseph Cheng
on 1 Apr 2014
To ad to Jan Simon's point are you looking how to get a file drop down menu which has print as an option?
Douglas Anderson
on 2 Apr 2014
Joseph Cheng
on 2 Apr 2014
So using printpreview() you can see the figure? I haven't tried to actually print beyond seeing it in the printpreview screen.
Douglas Anderson
on 2 Apr 2014
Joseph Cheng
on 2 Apr 2014
Figured it out!
n = printpreview(TESTS);
uiwait(n)
close(TESTS)
which will wait for the printpreview to close before closing the fig.
Douglas Anderson
on 2 Apr 2014
Douglas Anderson
on 2 Apr 2014
Douglas Anderson
on 2 Apr 2014
Joseph Cheng
on 2 Apr 2014
oh was there a part II? Oh did not see it as I don't get emails about updates to questions. I'll think about it and will answer it in your new Part II question
Joseph Cheng
on 2 Apr 2014
Quick search of the Matlab Answers for that gave a possible solution.
set(gcf,'Renderer','OpenGL')
Douglas Anderson
on 2 Apr 2014
Accepted Answer
More Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!