assign colarmap to multiple lines' lengths
조회 수: 3 (최근 30일)
이전 댓글 표시
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
답변 (2개)
Kelly Kearney
2013년 6월 25일
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
Zhenjia
2013년 6월 26일
댓글 수: 1
Walter Roberson
2013년 6월 26일
patch would not require that you divide the lines if you do not want the crossing to influence the coloring.
참고 항목
카테고리
Help Center 및 File Exchange에서 Color and Styling에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!