If i try to draw an x = form parable I obtain a strange draw. what i see
Searching in internet i didn't find anything, this is the code that I use to plot the graphic:
ui->graphic->addGraph();
ui->graphic->setInteraction(QCP::iRangeDrag, true);
ui->graphic->setInteraction(QCP::iRangeZoom, true);
double temp;
for (double i = -500; i < 500; i += 0.1) {
if(parableFormPair.first) {
xAxisValue.push_back(i);
temp = aTerm * pow(i, 2) + bTerm * i + cTerm;
yAxisValue.push_back(temp);
}
else {
yAxisValue.push_back(i);
temp = aTerm * pow(i, 2) + bTerm * i + cTerm;
xAxisValue.push_back(temp);
}
}
ui->graphic->graph(0)->setData(xAxisValue, yAxisValue);
ui->graphic->xAxis->setLabel("x");
ui->graphic->yAxis->setLabel("y");
ui->graphic->xAxis->setRange(-15, 15);
ui->graphic->yAxis->setRange(-15, 15);
ui->graphic->replot();
ParableFormPait.first tell me if the parable is y = or x = (if is true y =)