Info

This question is closed. Reopen it to edit or answer.

GUI showing axes in the background when using "print" or "saveas"

1 view (last 30 days)
I built a GUI that processes some data and outputs the results (figures with some subplots) to PDF/EPS/PNG.
The issue is that when I do this last step (either through print or saveas), the GUI window gets some axes drawn in the back of the window. Everything gets written and output correctly, but this is quite annoying.
Both of these cause the apparition of axes in the GUI:
print(figHandle, '-dpdf', fileName);
saveas(figHandle, fileName, 'pdf');

Answers (1)

Image Analyst
Image Analyst on 12 May 2016
  2 Comments
Tomas Zegard
Tomas Zegard on 16 May 2016
Thanks for the prompt answer. export_fig uses a different print/export toolchain for PDFs (Ghostscript). This would make my code dependent on the user having third party packages. So, while this might solve the issue, I would rather find a native solution. I personally don't understand why does saveas and print create axis in the background of the GUI window. I think this is part of a larger problem.
Image Analyst
Image Analyst on 16 May 2016
I don't know why their functions don't work like you expected. You might have to call them about that.

Community Treasure Hunt

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

Start Hunting!