I have a vector of integers that vary from 1 to 4.
A=[1 2 3 4 2 3 2 1 2 3 4 4]
I would like to plot A with different colors for each value... the vertical line that links A(1) to A(2) should have the color of the first value (in this case 1).
Is that possible?
and how to handle the case of NaN present in the vector? I should plot A against a time vector
A = [1 1 1 NaN 4 4 4 Nan 2 2 3 3];
time = [1 2 3 4 5 6 7 8 9 10 11 12];

