Changing color of plotting points according to number
2 次查看(过去 30 天)
显示 更早的评论
I'm plotting an error with respect to the number of points used.
Now there are three different ways to comput the error, and I always plot the maximal error.
If the maximum is for computation 1, I want the dot in the plot to be red, for computation 2 it should be blue, etc.
How can I achieve this? My data is in a n x 2 matrix
0 个评论
回答(1 个)
Walter Roberson
2023-11-28
Create a small colormap
scatter(x, y, [], INDEX)
caxis([1, size(YourMap, 1)])
colormap(YourMap)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Blue 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!