更新代码
This commit is contained in:
@@ -21,6 +21,7 @@ void frmQuadratic::initForm()
|
||||
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:
|
||||
ui->customPlot->addGraph();
|
||||
ui->customPlot->graph(0)->setData(x, y);
|
||||
|
||||
Reference in New Issue
Block a user