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 Kommentare

Matt J
Matt J am 20 Sep. 2022
Bearbeitet: Matt J am 20 Sep. 2022
Please show us the plot.
KSSV
KSSV am 20 Sep. 2022
Show us your data.
Sohini Bhattacharjee
Sohini Bhattacharjee am 20 Sep. 2022

Melden Sie sich an, um zu kommentieren.

Antworten (1)

KSSV
KSSV am 20 Sep. 2022
Bearbeitet: KSSV am 20 Sep. 2022

0 Stimmen

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 Kommentare

Sohini Bhattacharjee
Sohini Bhattacharjee am 20 Sep. 2022
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 am 20 Sep. 2022
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.

Melden Sie sich an, um zu kommentieren.

Tags

Gefragt:

am 20 Sep. 2022

Kommentiert:

am 20 Sep. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by