connecting points with the same value

I have a very dense scatter plot with a coloured bar and the points are colour coded according to the value shown in the colour bar. I want to connect the points which bear the same z value. Please help.

댓글 수: 3

Matt J
Matt J 2022년 9월 20일
편집: Matt J 2022년 9월 20일
Please show us the plot.
KSSV
KSSV 2022년 9월 20일
Show us your data.

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

답변 (1개)

KSSV
KSSV 2022년 9월 20일
편집: KSSV 2022년 9월 20일
REad about contour
Z = peaks(100) ;
pcolor(Z) ;
shading interp
hold on
contour(Z,[1 1],'k') % show/join the value 1 with black line

댓글 수: 2

Thanks for your answer. I am receiving this error while applying the peaks function.
"Error using repmat
Requested 501501x501501 (1873.8GB) array exceeds maximum array size preference (7.9GB). This might cause MATLAB to become
unresponsive."
What should I do?
KSSV
KSSV 2022년 9월 20일
I have shown you an example of how you can do it using contour. peaks is used to create demo data. You need to use contour for your data after reading the documentation.

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

카테고리

도움말 센터File Exchange에서 Scatter Plots에 대해 자세히 알아보기

태그

질문:

2022년 9월 20일

댓글:

2022년 9월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by