GUI: How do I hide the plotted data associated with a specific 'hidden' axis
조회 수: 51 (최근 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!