Borrar filtros
Borrar filtros

How to create a scatter plot with three variables?

7 visualizaciones (últimos 30 días)
Astro
Astro el 5 de Mayo de 2020
Comentada: Bjorn Gustavsson el 5 de Mayo de 2020
Hello,
I have a set of data (pressure, temperature, count)->(x,y,z). Is there a way to plot this in 2D with the z plotted in colors based on the values of the counts?
Thanks!

Respuesta aceptada

Bjorn Gustavsson
Bjorn Gustavsson el 5 de Mayo de 2020
you should use scatter, something like this:
psz = 23;
scatter(x,y,psz,z,'filled')
That should give you something to start with. Have a look at the help and documentation for more details.
HTH
  2 comentarios
Astro
Astro el 5 de Mayo de 2020
Thank you! I think this is what I'm looking for.
Bjorn Gustavsson
Bjorn Gustavsson el 5 de Mayo de 2020
One more thing to keep in mind is the matlab command lookfor - when you cannot find/remember the name of a function you can always search with lookfor:
lookfor scatter

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