필터 지우기
필터 지우기

Delete/Hide points of a surface

조회 수: 25 (최근 30일)
Kevin
Kevin 2011년 8월 18일
댓글: kiarash 2020년 10월 15일
Hello, quick question about a problem I have. Is it possible to delete or hide some points of a surface. I don't want to redraw the surface everytime but just make some points appear or disappear. Any idea ? Many thanks, Kevin

채택된 답변

Titus Edelhofer
Titus Edelhofer 2011년 8월 22일
Hi Kevin,
something like this?
data = peaks(25);
h = surf(data);
pause(3);
% delete one point (in fact delete all 4 patches containing this point
data(3,3) = NaN;
set(h, 'zdata', data)
Titus
  댓글 수: 2
Kevin
Kevin 2011년 8월 22일
yes exactly ! this should hide data(3,3) after the pause. In my case I stored the original data in an external one so I can replot the points (my idea is to make some part of a surface on and off during a specific time)
kiarash
kiarash 2020년 10월 15일
Thank you Titus

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Chaowei Chen
Chaowei Chen 2011년 8월 21일
figure;hold on; h1=plot(1,1,'b.'); h2=plot(2,2,'r.'); hold off
% if you want to hide h2
set(h2,'visible','off')
% if you want to delete h2
delete(h2)
  댓글 수: 2
Kevin
Kevin 2011년 8월 22일
That's not exactly what I need because I can't plot my surface in two part.
Actually I found out that turning some values to NaN hide the points on the surface.
Sam
Sam 2020년 5월 22일
Hello,
I have the same question but for the function 'probplot'.
It is more complex cause if you omitsome points , the probability plot changes...
I need a real hiding process that acts only on the plotted points and not on the raw data. This is pretty simple in JMP.Could you please advise ?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Map Display에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by