QCustomPlot Discussion and Comments

Data down-samplingReturn to overview

I have found through tests that individual peak values in the data values may or may not be displayed depending on the current range of the x-axis.

If more data points are handed over than what can be displayed (for example 800-pixel wide LCD display and 2000 data points), then a data down-sampling must take place.

Which down-sampling algorithm is used in QCustomPlot?
How can I control the downsampling algorithm?

If you're using line-connected graphs (setLineStyle not lsNone), the adaptive sampling will make sure all spurious peaks are displayed properly. In the case of scatter points only, points in the middle of a vertical range are thinned out which does lead to a visual change. However, even there spurious outer points should be preserved.

It would be great if you could provide me with a specific configuration (e.g. an example code which generates the data and plot setup) where you observe the behavior, with screenshots -- because leaving out outlier data points is exactly what the adaptive sampling algorithm explicitly avoids, so this is a bit strange and possibly a bug.

You can read more about adaptive sampling (with screenshots how it's supposed to behave with outliers) in the QCPGraph::setAdaptiveSampling documentation. To disable the adaptive sampling, call yourGraph->setAdaptiveSampling(false);