Display Several Plots in GUI using Slider
2 次查看(过去 30 天)
显示 更早的评论
I’m building a GUI that supposes to display several subplots. In order to display a subplot in the GUI I create a uipanel and set subplot(2,2,x,’Perent’,h_panel) where h_panel is the handle of the uipanel. Inside the code there is a ‘for’ loop and each iteration display a different subplot. I would like to have the opportunity to display all the subplots after the loop is done (using slider). Can I save the handle of each subplot or its struct array and then to redisplay it?
0 个评论
采纳的回答
Jing
2013-8-28
编辑:Jing
2013-8-28
Get the return of the SUBPLOT, then you can save the handle to each subplot.
h=subplot(2,2,x,’Perent’,h_panel); %h is the handle to the new axes object.
What do you mean by redisplay? How do you hide it? If it's just not in focus, use AXES could bring it back:
axes(h)
2 个评论
Jing
2013-9-18
编辑:Jing
2013-9-18
So you subplots are overwritten by others? I mean, for each iteration, a new subplot will cover the old one? If so, you can just hide the old subplot and just show the new one, and then show the old one when it's needed.
set(h,'Visible','off') %hide the subplot
set(h,'Visible','off') %show it
But if you have a lot of subplots, it requires a lot java heap memory to hold them.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!