Change underlying colormap for 'plot', just like in 'area'
18 次查看(过去 30 天)
显示 更早的评论
I'm trying to have a figure with various subplots, showing portfolio composition with area plots and portfolio returns with a normal (line) plots. For the area plot, Matlab is using the default colormap Jet, and I can change this by using
colormap(summer)
for example. Now it makes sense to plot the time series of returns of each assets in the same color as it has in the area plot, however, Matlab always uses the 'line' colormap, which has the problem that it repeats itself after the seventh color, making curves 8 and 9 blue and green like curves 1 and 2. typing colormap(summer), as above, does affect the 'area' command, but not the 'plot' command. I'm working with many subplots, hence a solution that does not have to be applied to every single plot would be best.
0 个评论
采纳的回答
the cyclist
2013-8-8
编辑:the cyclist
2013-8-8
Here's how:
I also sometimes use this utility from the File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/29702-generate-maximally-perceptually-distinct-colors
4 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Orange 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!