QCustomPlot Discussion and Comments

Set NEW data for histogramReturn to overview

This code

QCPBars *amp=new QCPBars(ui->hist->xAxis,ui->hist->yAxis);

only adds new data to the histogram and doesn't clear old data. Moreover, I call this method every time new data is needed.
How to clear the histogram every time?
hist->clearGraphs(); doesn't work

The problem was solved by global object designation QCPBars!