Multi line color in graph
3 次查看(过去 30 天)
显示 更早的评论
Hi,
While trying to plot a graph
plot(1:10, rand(10,10))
Each line has a different color.
Is it possible to vary the color scale from a darker shade to lighter shade? For instance, from black to grey
0 个评论
采纳的回答
Star Strider
2019-11-5
Try this:
cmap = colormap(gray(10));
figure
hp = plot(1:10, rand(10));
set(gca,'ColorOrder',cmap)
Experiment to get dufferent results.
12 个评论
Star Strider
2019-11-7
@Deepa Maheshvare — Thank you for following up. I am happy that it worked for you.
更多回答(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!

