QCustomPlot Discussion and Comments

Problem with negative slope dashed lines in 2.0.0Return to overview

See the following pic:


The dashed line style shows corruption as the negative slope increases. It never seems to happen with positive sloped dashed lines -- only negative sloped.

The issue is very reproducible and also affects other dashed-dot line styles.

Is this a Qt 5.8 or QCP 2.0.0 issue?

Here is a video link that shows the behavior which is still present for me in QCP 2.0.0 and Qt 5.11:


As the time (X) range is expanded, the negative slop of the line does not draw correctly.

Nobody else experiencing this?

Actually, looking at my video above, the problem appears to affect the solid line style too for negative slope. It seems to affect the drawing when the X values have a small delta in decimal (i.e. 75.02, 75.04, etc.) and they are compressed by expanding the drawing range.

this is a known side-effect of this special constellation: Your data is highly oversampled, so you have a smooth line, but with many points in between, and adaptive sampling is turned on, so the adaptive sampling algorithm takes out some of the points to improve plot performance and replaces it with vertical binning. In normal circumstances (noisy high density data) the resulting loss of antialiasing quality is unnoticeable, but in this special case here it is.
You have two options: disable adaptive sampling for the graph (graph->setAdaptiveSampling(false)), or don't oversample your smooth line so strongly.

Ok, but it seems odd that the problem only manifests for the negative slope of the line. I've not observed it on the positive slope. ?? Why would there be a difference?