2D scatter plot with Z-value in color

Hi all,
It’s a basic question but I struggle to find the answer on the Internet...
I have a matrix with x,y and z colum, representing the c-coordinate, the y-coordinate and depth (z).
I’d like to plot (x,y) but that those points show a colorscale depending on the depth value (just the point colors I don’t want an interpolation).
Can somebody help me please?

1 comentario

Caoimhe Madine
Caoimhe Madine el 31 de Mzo. de 2020
Would anyone be able to tell me how to do this but then interpolate the colours?

Iniciar sesión para comentar.

 Respuesta aceptada

Walter Roberson
Walter Roberson el 30 de Jul. de 2013
pointsize = 10;
scatter(x, y, pointsize, z);

10 comentarios

Saskia
Saskia el 31 de Jul. de 2013
Great thanks! Do you know how I can set full points and not just the border?
Saskia
Saskia el 31 de Jul. de 2013
OOuupsss got it.
Thanks again!
Bilel Njeh
Bilel Njeh el 20 de Nov. de 2018
thanks!
madhan ravi
madhan ravi el 1 de En. de 2019
Carlos Noton's response:
Thank you!
alberto caracciolo
alberto caracciolo el 25 de Sept. de 2019
Thank you.
I managed to color the points (with the default color scheme) according to a third variable. However, how can I change the colour scheme? And ho can I get a legend with a color bar?
Cheers
Trent Simonetti
Trent Simonetti el 25 de Sept. de 2019
Is there a possibilty of getting this visualization with a color bar?
alberto caracciolo
alberto caracciolo el 26 de Sept. de 2019
Yeah, that is basically my same question!
Emirhan Solmaz
Emirhan Solmaz el 27 de Sept. de 2019
Hi. Could you tell me how you did color gradient with z value?
Not sure if you still need the color bar:
cb = colorbar();
zhou weiyan
zhou weiyan el 3 de Ag. de 2022
Thank you!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Discrete Data Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 30 de Jul. de 2013

Comentada:

el 3 de Ag. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by