GUI: How do I hide the plotted data associated with a specific 'hidden' axis
50 次查看(过去 30 天)
显示 更早的评论
I made a gui that shows 2 plots out of 58 at a time on a panel. These plots are all generated at the same time with their respective axes. The 56 axes that are not being viewed, are at some 'position' outside of the panels scope.
-slightly laggy I know! When I switch from first pair of axes to the next, all 58 plots axes switch positions slightly. I have their positions coded like a converyor belt if you will. First look at the first set, then the following and so on, moving all of the plot positions when viewing the next pair of axes.
So I decided to turn off the visibility of 75% of the panels while I am viewing the first 25% and then turn off the first 25% while I am vieiwing 26-50% and so on. GUI works MUCH faster but now I am having a slight issue with what is visible and what isn't.
Issue: The plotted data is still showing up while the axes itself is hidden! how do i overcome this??
here are a few pictures.
Ideally: the plot and data would completely turn off or be invisible while I am not viewing them.

0 个评论
采纳的回答
Adam Danz
2019-8-5
编辑:Adam Danz
2019-8-6
"How do I hide the plotted data associated with a specific 'hidden' axis? "
Turn visibility off on the axes and all of its children. Here's a demo that creates 2 subplots, plots some stuff, and then turns off the 2nd subplot and all of its children.
figure()
sph(1) = subplot(2,1,1);
plot(rand(1,80), 'o')
sph(2) = subplot(2,1,2);
plot(rand(1,80), 'o')
hold on
lsline()
% Turn off axis and all data on the axis
set([sph(2);sph(2).Children], 'Visible','off') %<--vertically concatenate all handles.
2 个评论
Adam Danz
2019-8-6
The last line in my answer does that. To adapt it to your variables,
set([PlotAX17;PlotAX17.Children], 'Visible','off')
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Specifying Target for Graphics Output 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!