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).
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!