Changing colors within a line a plot

6 visualizaciones (últimos 30 días)
ANKUR KUMAR
ANKUR KUMAR el 11 de Dic. de 2017
Respondida: Walter Roberson el 11 de Dic. de 2017
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?

Respuestas (1)

Walter Roberson
Walter Roberson el 11 de Dic. de 2017
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

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by