I am investigating spike detection in audio data. I have 3 vectors of data: t, xp and yp, which I produce a 3D diagram from using plot3. Earlier on in my script, I determine a vector, say 'color2', containing the indexes of points that I would like to plot as blue, with the rest of the data as black. It is easy to produce a 3D plot of un-connected points with the following code:
This produces the following plot:
However, ideally I would like a single, continuous line of data where blue points are joined by blue lines and black points are joined by black lines, similar to the image below:
What's the simplest way of doing this? Cheers.