Hello,

I am struggling with suspected memory overflow due to Qcustomplot->replot(). I have 10 graphs added to 1 plot and they share common y-axis. Below is my code to update the graphs

void SPI::plotOnCommonAxis(unsigned int index, QList<double> signalValues) { for(int i =0; i<plots[startIndex]->plottableCount(); i++) { if(unSelectedGraphs.contains(i)) { continue; } if((plots[startIndex]->plottableCount() - unSelectedGraphs.count()) == signalValues.count()) { for(int j=0; j < spiSignalsSV.count(); j++) { if(spiSignalsSV[j]==checkbox[i]->text()) // this is just to make sure that incoming signal matches with the graph { signalText[i]->setText(QString::number(signalValues[j])); // this is just to update QLineEdit plots[startIndex]->graph(i)->addData(index,signalValues[j]); } } } } plots[startIndex]->rescaleAxes(); plots[startIndex]->yAxis->scaleRange(1.1,plots[startIndex]->yAxis->range().center()); plots[startIndex]->replot(); }

It works fine when I plot the data on individual plots with only one graph like 10 plots for 10 signals. It also works fine if I don't perform plots[startIndex]->replot()

Any suggestion/help would really be appreciated.

Thank you.