How to "print" on the command line or from a gui like is done from the figure "file" menu option
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Douglas Anderson
el 1 de Abr. de 2014
Comentada: Douglas Anderson
el 2 de Abr. de 2014
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
Joseph Cheng
el 2 de Abr. de 2014
Quick search of the Matlab Answers for that gave a possible solution.
set(gcf,'Renderer','OpenGL')
Respuesta aceptada
Joseph Cheng
el 1 de Abr. de 2014
Thinking about it more... here is what i came up with.
in GUIDE use the menu editor add in file and print as a new menu and menu item.
after that in the call back for print
TESTS=figure;
copyobj(handles.axes2,TESTS);
printpreview(TESTS);
close(TESTS);
printpreview() may not be what you are looking for but as a temporary thing to see if you are actually getting the axes you are looking for. after you know this is what you're looking for then you can swap out printpreview() with printdlg().
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Graphics Object Properties en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!