assign colarmap to multiple lines' lengths
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a graph with weights associated to the edges. I plot the edges as lines and I would like to assign colors in a continuous colormap to each edge. Does any one know how to do it? Thanks.
0 Kommentare
Antworten (2)
Kelly Kearney
am 25 Jun. 2013
Do you mean something like this?
x = 1:10;
y = rand(1,10);
w = 1:10; % weights
patch([x NaN],[y NaN],[c NaN], 'edgecolor', 'interp', 'facecolor', 'none')
0 Kommentare
Zhenjia
am 26 Jun. 2013
1 Kommentar
Walter Roberson
am 26 Jun. 2013
patch would not require that you divide the lines if you do not want the crossing to influence the coloring.
Siehe auch
Kategorien
Mehr zu Color and Styling 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!