I'm using a SimpleLinePlot to plot the results of repeated function calls. When the function returns an invalid value I store a dummy datapoint in my TimeSimpleDataset and I mark the point as invalid. As desired, I have gaps in my plot where invalid datapoints are not plotted.
However, I noticed several situations where two valid datapoints are joined by a solid line even though there are datapoints between them that have been marked as not valid. Normally there is a gap at the location of a datapoint that is marked as invalid.
The problem occurs when a single valid datapoint is preceded and followed immediately by an invalid point.
For example, if I plot the results of several function calls where on successive calls
f(x) = an invalid value f(x+1) = valid f(x+2) = invalid; f(x+3) = invalid; f(x+4) = valid
then a solid line is drawn from datapoint (x+1) to datapoint (x+4). I expected a single point to be plotted for (x+1) followed by a gap for (x+2) and (x+3).
The problem seems to be the single valid datapoint. If I rig my function so that f(x) above returns a valid value then the plot works exactly as it should.
Is there a way to plot a single point in this situation?
Rick |