Print specific figure in GUI
Mostrar comentarios más antiguos
Welcome All
I hope to be alright :)
I make GUI in matlab , it's contain print button because i want to print specific figure in my GUI
I try that :
function pushbutton4_Callback(hObject, eventdata, handles) % hObject handle to pushbutton1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% Callback function run when the Print menu item is selected
h = handles.axes2;
print(h)
but, an Error was Appear !!
Plz help me :(
2 comentarios
Chandra Kurniawan
el 29 de Nov. de 2011
What is the error message??
Maryam Emad
el 29 de Nov. de 2011
Respuesta aceptada
Más respuestas (4)
Oliver Woodford
el 29 de Nov. de 2011
The export_fig package contains a function called isolate_axes. You can use this to send a specific axes to a printer as follows:
figure_handle = isolate_axes(axes_handle);
print(figure_handle, ...); % Add the correct print options here
close(figure_handle);
axes_handle can also be a vector of handles of axes in the same figure, in which case all the axes will be printed.
Daniel Shub
el 29 de Nov. de 2011
1 voto
You can print a single axis with export_fig: http://www.mathworks.com/matlabcentral/fileexchange/23629-exportfig
3 comentarios
Image Analyst
el 29 de Nov. de 2011
Correction - that's export_fig, NOT to be confused with exportfig.
Daniel Shub
el 29 de Nov. de 2011
@IA, nice catch. I fixed it.
Maryam Emad
el 29 de Nov. de 2011
Maryam Emad
el 29 de Nov. de 2011
0 votos
Raphael Ferreira
el 8 de Mzo. de 2018
0 votos
Hi, how are you? Were you able to print a specific figure in the guide? If yes, can you send the code to my emai? email: rkhayker@gmail.com I am developing my thesis and I need this function. I've been trying for two weeks. I'm grateful already!
1 comentario
Jan
el 8 de Mzo. de 2018
Please do not hijack another thread, but open your own one. The nature of this forum is sharing solutions in public, so sending code to an email address is not the right way.
Explain in your new thread, what "print a specific figure in the guide" means, because this is not clear yet.
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!