In the setupSincScatterDemo I calculate a residual and want to draw it in a window using the style of demo(1). I.e. I expect a broken blue line filled below the line. The filled area (produced by the brush) is OK, but the broken line is not drawn when the slope is too high, i.e. broken line is visible only over the sections where the slope is low. To reproduce the problem: I use the data generated by setupSincScatterDemo, and I added the residual calculation as
for (int i=0; i<50; ++i) { ... YResidual[i] = (Y1[i]-Y0[i])/sqrt(Y1[i]); }
and draw it as
void ESsistMe_ResidualWindow::setupSimpleDemo(QCustomPlot *customPlot) { customPlot->setLocale(QLocale(QLocale::English, QLocale::UnitedKingdom)); customPlot->addGraph(); customPlot->graph(0)->setPen(QPen(Qt::blue)); customPlot->graph(0)->setBrush(QBrush(QColor(0, 0, 255, 20))); customPlot->graph(0)->setData(X1, YResidual); customPlot->graph(0)->rescaleAxes(); }