I am plotting data against time. The time variable has a uniform sampling rate, but there are times when there may be gaps in the data, for example, when something is powered off. These gaps can be any length of time. When you plot a variable against this time, if there is a gap between two points in time that is greater than the sampling rate, you naturally end up with a plot that has a single line between those two points. Visually, this can be deceiving and can make the gap difficult to identify at first glance, depending on the values of the other variable at those two points. Ideally, I would want to supress the line between those two points, leaving a visual gap. This could obviously be done manually by identifying gaps and then plotting different "chunks" of data with separate commands, but this is not practical beyond a one-off situation. You could potentially create a wrapper around the plot function and choose a time value that identifies gaps in the data that are "too large," plotting "chunks" of data defined in that manner. This would suffer from the use of a static value for that "too large" designation. Does anyone have any good ideas for handling the situation I described, or perhaps seen anything creative out there that would be useful? I realize I'm fighting against the nature of the plot function, but I thought someone else might have already thought of a creative way to address the issue.
Edit:Here's an example of the time vector for reference:
Let's say I have data that is logged at ~1 Hz and the time variable has a range of 10 hours. It might start out like this (I'll assume index 1 is time=0 for ease of dicussion):
[0, 1.00, 2.01, 3.02, 4.01, 5.01, 5.99, 6.98, 7.99, 9.01, 10.00...]
Then you might see a number of gaps of several seconds throughout the 10 hours, maybe a few gaps of several minutes, and a couple gaps of 30 or 45 minutes. Obviously, for the values that are ~1 second apart, I want to connect the data points with a line normally.
Thanks for the help.