QCustomPlot Discussion and Comments

How to hide grid and show only zeroline in QCustomPlot?Return to overview

Is there any way of showing zeroline in QCustomPlot while hiding grid? I have tried hiding grid with following line:


But this also hides the zerolines. I need to keep zerolines visible.

Set Qt::NoPen to QCPGrid::setPen/setSubGridPen, but not setZeroLinePen.

customPlot->xAxis->grid()->setZeroLinePen(QPen(QColor(255,255,255,100), 1, Qt::DashLine, Qt::RoundCap, Qt::RoundJoin));