2D scatter plot with Z-value in color

370 visualizaciones (últimos 30 días)
Saskia
Saskia el 30 de Jul. de 2013
Comentada: zhou weiyan el 3 de Ag. de 2022
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
Mateusz Surma
Mateusz Surma el 17 de En. de 2020
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 Scatter Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by