How to only print GUI graph with GUIDE toolbar

1 vue (au cours des 30 derniers jours)
Kokalz
Kokalz le 24 Juil 2012
Hi guys!
I have added a toolbar for my GUI ( that has some data and a graph). I added save, print and data cursor tools to it. How can I do following:
  • When someone clicks the print button I want it to print only the graph and set the defaul layout to 'Landscape'.
  • Clicking the save button does nothing. How can I configure it to save the graph as a picture (if that's even possible).
  • Clicking the data cursor option allows me to get values from any location on my gui. I want it to give values only of the graph.
I tried looking at the properties in the GUIDE toolbar editor, but can't find anything like that there. I also tried to using a simple 'Print' pushbutton for printing with function 'print(handles.axes1)' in its callback, but it gives me the following error:
Error using LocalCheckHandles (line 87)
Handle Graphics handle must be a Figure.
Any help is really appreciated!

Réponses (1)

Kokalz
Kokalz le 24 Juil 2012
After doing a bit more searching it appears that you cannot just print from the axes. The only possible way to print is to copy the graph to a figure and print from there. When I do that, my printed graph is only partially on the paper. How to make i fit properly??
Thank you!
  2 commentaires
Jan
Jan le 24 Juil 2012
Set the PaperPosition and PaperSize of the figure accordingly.
Kokalz
Kokalz le 24 Juil 2012
Yeah, figured it out literally a second ago. Thanks a lot for help!
Do you think there's a chance to make the 'Data Cursor' tool from the GUIDE toolbar editor only functional on the graph?
Thank you!

Connectez-vous pour commenter.

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by