save GUI figure to pdf

5 Ansichten (letzte 30 Tage)
Dominika
Dominika am 19 Mai 2014
Kommentiert: Dominika am 20 Mai 2014
Hi,
I want to save the figure from GUI to pdf. Before saving I want to allow the user to choose the name and the folder where he wants to put the file. I try with this:
function Save_Callback(hObject, eventdata, handles)
% hObject handle to Save (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
orient landscape
file = uiputfile('*.pdf');
print(file, '-dpdf');
The problem is I cannot choose the destination path. The file is saved in the current folder only and one panel of my figure is missing.
How can I solve my problem?
Many thanks,
Dominika

Akzeptierte Antwort

Roberto
Roberto am 19 Mai 2014
try several overloaded methods for UIPUTFILE
[file path] = uiputfile('*.pdf');
print([path file], '-dpdf');
  1 Kommentar
Dominika
Dominika am 20 Mai 2014
Thanks Roberto, it worked.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by