Saving UIPanel as image in app designer

11 次查看(过去 30 天)
Is there a way to save a whole panel (with plots in it) as an image in app designer? with GUIDE i used the following code:
panel_pos = getpixelposition(handles.Allplots); % Get the position of the panel including all plots
newfig = figure('Units','pixels','Position',panel_pos,'Visible','off'); % Create invisible temporarily new figure
copyobj(handles.Allplots,newfig) % Copy panel into the new figure
saveas(newfig,plot_filename,'jpg'); % Save plots as jpeg file
delete(newfig) % Delete temporarily figure
Apparently the copyobj no longer works for the panels (though i can get it to copy single plots).

回答(1 个)

Jinhan Kong
Jinhan Kong 2020-1-17
have you solved the problem?
  1 个评论
Simon
Simon 2020-1-17
Hello Jinhan,
i stayed with GUIDE for the moment. I want the GUI to create the same image as the older versions so i did not attempt to work around the issue with single images for each plot.
Good luck to you

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by