QCustomPlot Discussion and Comments

a problem in online plotReturn to overview

hi,i use this method for each 100 points plotting:
double x1, y1;

    for (int i=0;i<100  ;i++){
    x1= .. ;
    y1=.. ;
    ui->customPlot->graph(0)->addData(x1,y1);

problem is : i want to keep the last 2000 points. what is the best way for do it?
note: i don't save data points seprate. because i dont use SetData method.
THANK ALL

Why not just use a vector and setData()? Then you can do with data from vector whatever you like.