I would like to plot the quadratic equation y = -0.2204*x**2 + 124.87*x - 1819.2, but when x=0, y is getting 0 and shows the spike with y=0. why? other values are correct

thanks in advance.

QVector<double> x(120), y(120);// initialize with entries 0..100

for (int i=0; i<100; i++)

{

x* = i - 40 ;// x goes from -1 to 1
y1 = (-0.2204*(i - 40)*(i - 40 ))+ (124.87*(i - 40)) - 1819.2; // 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("Temperature");
customPlot->yAxis->setLabel("Density Altitude");
// set axes ranges, so we see all data:
customPlot->xAxis->setRange(-40, 100);*