QCustomPlot Discussion and Comments

Change lines in axis-rect?Return to overview

Is it possible to change the color of the lines of x and y (at x=0 and y=0) ?

Without doing anything it is lightgray, but I would like to change them to black.

for axis-base-line

void QCPAxis::setBasePen (const QPen &pen);

for zeroline

QCPAxis *axis = addAxis(QCPAxis::atBottom);
...
axis->grid()->setZeroLinePen(QPen(QColor("black")));

Thank you @define true false, I did it like this:

    plot->yAxis->grid()->setZeroLinePen(QPen(QColor(Qt::black)));

It works perfect!