Color based on values from a matrix.
显示 更早的评论
Hello!
Quick question: I have a 3-by-n matrix with three rows, x- and y-coordinates of 5-15 randomized points on the first two rows, and mass on the 3rd row, ranging from 10-1000kg. I want the color of these points to be based on the mass, for instanse big mass=red, low mass=blue. I use the scatter function to plot these points and tried to use the third row of my matrix for color, but the colors seemed to be random. Is there a simple way of doing this?
Thanks!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!