How to "print" on the command line or from a gui like is done from the figure "file" menu option
Mostrar comentarios más antiguos
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 comentarios
Jan
el 1 de Abr. de 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
el 1 de Abr. de 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
el 2 de Abr. de 2014
Joseph Cheng
el 2 de Abr. de 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
el 2 de Abr. de 2014
Joseph Cheng
el 2 de Abr. de 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
el 2 de Abr. de 2014
Douglas Anderson
el 2 de Abr. de 2014
Douglas Anderson
el 2 de Abr. de 2014
Joseph Cheng
el 2 de Abr. de 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
el 2 de Abr. de 2014
Quick search of the Matlab Answers for that gave a possible solution.
set(gcf,'Renderer','OpenGL')
Douglas Anderson
el 2 de Abr. de 2014
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!