Increase colour variation in a 2D scatter graph
2 次查看(过去 30 天)
显示 更早的评论
I am making a scatter graph of my data and am using one column of my data to colour code my points, so I am using the following code:
scatter(x,y,[],v,'filled')
However I would like to play with the colour option a little bit and change it so that I have a wider variation in colour and also change the colour scheme to blue yellow and red. How can I do this? I thought about squaring the vector that I use so as to show up a greater difference between points? Any other suggestions?
0 个评论
回答(1 个)
Image Analyst
2015-5-9
One of the optional inputs to scatter is a list of colors for every marker. Use that. You can make them up with some custom code, or you can use one of the standard functions like hsv(), jet(), winter(), etc. Pass in the number of data markers into those color map creating functions.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Discrete Data Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!