Hello, I'm trying to implement a continuous plot application that has two main guidelines:
  1. when the plot reaches the end it must start to refresh the existing data from the start
  2. there must be a gap between the new data being fed to the plot and the data that gets erased


I managed to successfully maintain the gap between the new data and the old data using something like this:
Qt Code:
  1. m_mainData->takeFirst();
  2. m_mainData->append(yValue);
To copy to clipboard, switch view to plain text mode 

the first time I reach the end of the screen I just delete some extra data from the start of the array and with it I guarantee that I'll always have that gap.

now ... the problem I'm facing is when the plot reaches the end and starts over, the plot interpolates the last point with the first one and visually I see a horizontal line that appears at different locations in relation to the last data point. My first idea was to try to plot the last and first data points off-screen so that the lines is not visible, but I don't see it as a clean approach and I may also have some cases where the line manages to appear since it depends on the data.

Any ideas on how I can manage to separate the last data point on screen with the first one painted? I'm using a left to right sweep for plotting, the signal type is the same as a medical electrocardiograph parameter for reference.

Thanks in advance