QCustomPlot clear Data
I have qcustomplot grapich. It have lots of line ploting before. I want to clear this ploting data.
There is 2 code which is find. but these codes delete graph (0-1-2-3);
I want to clear graph data not graph completely. How can I figure out ?
yes ı wrote.
Is it solved?
no. all about deleting not cleaning
I think Ian explained rather clearly what you can or can not do. I don't see how we could add to that.
Since the 2.0 beta version.
Alternatively, you can simply give it an empty data list.
Then its "Clear".
I wrote this code and problem solved. Thank you mrjj !!!
ui->qcustom->graph(0)->data()->clear(); ui->qcustom->graph(1)->data()->clear(); ui->qcustom->graph(2)->data()->clear(); ui->qcustom->replot();
@kshegunov I dont want to set empty data . I was searching for fallowing code which is shared by mrjj.
I'm facing some issue with ui->qcustom->graph(0)->data()->clear();. It is not working for me.
Data container is not getting cleared, even if i call clear() and then replot().
I have the same problem as indu2. Calling clear() and replot(), nothing happens