I noticed that if you change the variable timespan of Polygraph.java to say, 1000 and run the program, the charts in Polygraph will plot data but at time 106 seconds (for me) the first quarter to half of the plotted data is erased. This trend continues erasing the first quarter to half of plotted data every now and again.
Is there a setting that corresponds to how many points of data to keep on a chart?
First, you are posting in the wrong forum. Questions about the RTGraph routines belong in the RTGraph for Java forum.
Turning the AutoTruncate function off using RTProcessVar.setAutoTruncateDataset(false), is one solution, assuming that your program has a finite run time and does not acquire enormous amounts of data. Otherwise the RTProcessVar buffers holding the historical data can become huge, slowing things down. A better solution is to set the minimum and maximum values of RTProcessVar historical buffer using the RTProcessVar.setAutoTruncateMaxCount, and RTProcessVar.setAutoTruncateMinCount methods. If the autoTruncate flag is true, the buffer automatically truncates when the number of data points reaches autoTruncateMaxCount. It truncates the number of points in the data set to autoTruncateMinCount.