plotting a line that is multiple colors

조회 수: 6 (최근 30일)
charles atlas
charles atlas 2011년 11월 16일
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?

답변 (1개)

Walter Roberson
Walter Roberson 2011년 11월 16일
Not with a single line. Individual lines are restricted to one color.
Please see the solution to the similar question from earlier today

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by