3D scatter plot scroll through Z axis

조회 수: 12 (최근 30일)
Chiara Pivetta
Chiara Pivetta 2018년 10월 31일
댓글: KSSV 2018년 10월 31일
Hi,
I am new in matlab. I have a 3D scatter plot and I would like to interactively choose to display only one Z position at the time or a selection of Z positions.
Anyone has an idea how to do it?
Thanks a lot!

답변 (1개)

KSSV
KSSV 2018년 10월 31일
N = 100 ;
x = rand(N,1) ;
y = rand(N,1) ;
z = rand(N,1) ;
figure
scatter(x,y,10,z,'filled')
title('all points')
figure
scatter(x(N),y(N),10,z(N),'filled')
title('last point')
figure
idx = z<=0.5 ;
scatter(x(idx),y(idx),10,z(idx),'filled')
title('points for which z < = 0.5')
  댓글 수: 2
Chiara Pivetta
Chiara Pivetta 2018년 10월 31일
Thanks a lot, but I need to have a scroll bar on the same figure to scroll through different z position..
KSSV
KSSV 2018년 10월 31일
You have the options of pan, datatip, zoom etc...

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by