Changing colors within a line a plot

조회 수: 5 (최근 30일)
ANKUR KUMAR
ANKUR KUMAR 2017년 12월 11일
답변: Walter Roberson 2017년 12월 11일
I have the set of [x y] point, which I have to plot the line plot. I also have the weights of these pairs. I want to plot line plot with changing jet colors based on their weights. How can I do that?

답변 (1개)

Walter Roberson
Walter Roberson 2017년 12월 11일
That is not possible using a single primitive line object in MATLAB. You need to either create one line object for each colour or you need to use a patch or surface object with colored edges. You will find a few colored line contributions in the File Exchange

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by