2D color plot with 3 vectors
Mostrar comentarios más antiguos
I have three vectors: x, y and z. Each (x(i), y(i)) coordinate corresponds to one z(i). I want to plot a 2D plot with x, y as axes and z denotes the colors. What should I do? Thanks a lot.
Respuesta aceptada
Más respuestas (3)
Richard
el 28 de Mzo. de 2012
1 voto
you could use pcolor(x,y,z). If you need further instruction let me know.
2 comentarios
Zhiting
el 28 de Mzo. de 2012
Walter Roberson
el 28 de Mzo. de 2012
image() would be better than pcolor().
pcolor() and image() would assume that you have a full matrix of data, but the user only has vectors -- scattered points.
SSth
el 26 de Oct. de 2017
0 votos
How can I change color pattern.
Categorías
Más información sobre Scatter Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!