Different colors for scatter plot points based on the difference of x-y values
103 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a scatter plot of two arrays, x and y. I need to distinguish the points in the plot with different colours based on the difference between x and y values. Hope someone can help me!
Thanks very much
0 个评论
采纳的回答
Cris LaPierre
2021-1-19
You will need to come up with a vector that contains the values you want to use to set the color of the points. Once you have that, pass it in as the 4th input using the following syntax:
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Scatter Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!