How to hide the grid and show only caroline in QCustomPlot?

Is there a way to show a null value in QCustomPlot by hiding the grid? I tried to hide the grid with the following line:

ui->customPlot->xAxis->grid()->setVisible(false);
ui->customPlot->yAxis->grid()->setVisible(false);

But it also hides zeros. I need to keep the zeroers visible.

+4
source share
2 answers

Set Qt::NoPento QCPGrid::setPen/ setSubGridPenbut not setZeroLinePen.

+5
source
Current->xAxis->grid()->setSubGridVisible(false); 
Current->yAxis->grid()->setSubGridVisible(false);
0
source

All Articles