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.

채택된 답변

Adam Danz
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
Vadim Kachan
Vadim Kachan 2019년 8월 6일
Set(Handle.Children,'Visible','off') is what i was looking for. Thank you!
Is there a line that will turn off parent and children or below is the best way to turn off both?
set(PlotAX17,'visible','off')
set(PlotAX17.Children,'visible','off')
Adam Danz
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 CenterFile 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!

Translated by