There are several examples using the QCPGraph::setPen
function in the demos section. here is a small snippet from http://www.qcustomplot.com/index.php/demos/sincscatterdemo:
QPen pen; pen.setWidth(1); pen.setColor(QColor(180,180,180)); customPlot->graph(0)->setPen(pen);
Is this what you are looking for void QCPAbstractPlottable::setSelectionDecorator ( QCPSelectionDecorator * decorator)
?
setSelectionDecorator does exactly what I want.
Thanks.
By the way I have noticed that pen thicness of the graphs must be 0 (or 1) to avoid a fall down in performance (I replot every 50ms max). For now it's not a problem, but in the future could be.
Thanks again.
Also if you don't want to set decorator you can change current decorator properties with
QCPSelectionDecorator * QCPAbstractPlottable::selectionDecorator ( ) const
examples:
ui->customPlot->graph()->selectionDecorator()->setPen(QPen(Qt::green)); someGraph->selectionDecorator()->setPen(QPen(Qt::green));