Effacer les filtres
Effacer les filtres

2D scatter plot with Z-value in color

243 vues (au cours des 30 derniers jours)
Saskia
Saskia le 30 Juil 2013
Commenté : zhou weiyan le 3 Août 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 commentaire
Caoimhe Madine
Caoimhe Madine le 31 Mar 2020
Would anyone be able to tell me how to do this but then interpolate the colours?

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 30 Juil 2013
pointsize = 10;
scatter(x, y, pointsize, z);
  10 commentaires
Mateusz Surma
Mateusz Surma le 17 Jan 2020
Not sure if you still need the color bar:
cb = colorbar();
zhou weiyan
zhou weiyan le 3 Août 2022
Thank you!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Scatter Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by