What I want to do is just like this:

/* here is the copy from the example code */ // generate some data: QVector<double> x(101), y(101); // initialize with entries 0..100 for (int i=0; i<101; ++i) { x[i] = i/50.0 - 1; // x goes from -1 to 1 y[i] = x[i]*x[i]; // let's plot a quadratic function } // create graph and assign data to it: customPlot->addGraph(); customPlot->graph(0)->setData(x, y); // give the axes some labels: customPlot->xAxis->setLabel("x"); customPlot->yAxis->setLabel("y"); /* the function I need but not exist */ customPlot->graph(0)->changeData(0.0, 100.0); // which will change the point to (0.0, 100.0); // not bad but not good enough x[0] = 100.0; customPlot->graph(0)->setData(x, y); plot->replot();