plotting a line that is multiple colors

6 visualizaciones (últimos 30 días)
charles atlas
charles atlas el 16 de Nov. de 2011
I have some data that I am plotting column A is time data in seconds, column B is height and column c is a column of string data that says 'raising', 'lowering', 'steady'. Column c corresponds to the time and the height that the object was at and at that specific point and time if it was being raised or lowered or it was not moving. I am wondering if I could plot the data with time on the x axis and height on the y axis and change the color of the graph accodrding to if at that time the object was being raiseed or lowered or was not moving.
The end result would be a simple plot of time versus height and the graph would be 3 different colors. Is there any way that I could do this?

Respuestas (1)

Walter Roberson
Walter Roberson el 16 de Nov. de 2011
Not with a single line. Individual lines are restricted to one color.
Please see the solution to the similar question from earlier today

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by