Multi line color in graph
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Deepa Maheshvare
am 5 Nov. 2019
Kommentiert: Star Strider
am 7 Nov. 2019
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 Kommentare
Akzeptierte Antwort
Star Strider
am 5 Nov. 2019
Try this:
cmap = colormap(gray(10));
figure
hp = plot(1:10, rand(10));
set(gca,'ColorOrder',cmap)
Experiment to get dufferent results.
12 Kommentare
Star Strider
am 7 Nov. 2019
@Deepa Maheshvare — Thank you for following up. I am happy that it worked for you.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Orange finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

