Info

This question is closed. Reopen it to edit or answer.

Help: Need to make coulored 2D plot, with coulor changing according to value of a third variable

1 view (last 30 days)
The graph comes from ploting a vector of displacement "d" (y axis), v/s a vector of time (x axis). So i have a certain displacement for each time. There is a third vector "z"(the same length than de "d" and "t" vector) that has only values between 0 and 1. So i have also a value of "z" for each time. there is a certain relation between "d" and "z" (proportional in a certain way) So what i need is a plot "d" v/s t, in wich the colour of the plot (t vs d) changes depending on the value that takes z for the same time period, for ex: - if Z in t=20 is between 0 and 5, the plot d v/s t in that same instant is plotted in black - if z is t=30 is between 5 and 7, the plot d v/s t in that same instant is plotted in black green
The plot is something like the file added.
Thanks!

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!