Print command prints GUI figure instead desired one

1 回表示 (過去 30 日間)
Packy
Packy 2016 年 10 月 6 日
回答済み: Paramesh 2016 年 10 月 6 日
Hi everybody... I'm working on a GUI for the first time and the most of the commands i wrote were inspired by what i found on internet!!! I'm writing a GUI that takes data in input, manipulates them somehow, generates some plots and print them on a PDF file with the right scaling. Before starting building a GUI, i've wrote this program as a normal matlab function and works perfectly, but when i use the same code in a GUI, in the saved PDF there is the GUI figure instead the desired plot. The code i used is something like that:
figure(6);
set(gcf,'Visible', 'off'); % To hide the figure in the GUI processing
plot(.........)
axis equal
axis off
set(gca, 'Position',[0 0 1 1])
fig_height=10;
fig_width=10;
set(gcf,'Units','centimeters','position',[0 0 fig_width fig_height])
set(gcf, 'PaperPositionMode','auto')
set(gcf, 'PaperOrientation','landscape')
print(['FileName','-dpdf','-r300')
Can someone help me? Thank you very much!

回答 (1 件)

Paramesh
Paramesh 2016 年 10 月 6 日
use axes in matlab gui

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by