0
qcustomplot을 사용하여 불연속 점에있는 두 함수 사이에 잔차를 그립니다.QCustomPlot 두 함수 사이에 잔류 물 그리기
저는 위치 (x), 시작 값 y.at (x) 및 height.at (x)를 알고 있습니다.
내가 지금까지 가지고하는 것은 Y에 오류 바는 + -error :
QCPErrorBars *errorBars = new QCPErrorBars(customPlot->xAxis, customPlot->yAxis);
errorBars->setDataPlottable(customPlot->graph(0));
QVector<double> y1err(x.size());
for (int i = 0; i<x.size(); ++i)
{
y1err[i] = y.at(i) * error;
}
customPlot->graph(0)->setData(QVector<double>::fromStdVector(x), QVector<double>::fromStdVector(y));
errorBars->setData(y1err);
제로에서 시작하는 줄 :
QCPBars *newBars = new QCPBars(customPlot->xAxis, customPlot->yAxis);
std::vector<double> xData, yData;
for (auto i = 0; i < x.size(); ++i)
{
xData.push_back(i+1);
yData.push_back(y.at(i));
}
newBars->setData(QVector<double>::fromStdVector(x), QVector<double>::fromStdVector(y));
는하지만 내가 정말 원하는 것은 음모의 일종이다 y.at (x) 값에서 시작하여 두 xy 플롯에 추가하여 점 x에서 잔류 물의 높이로 시작합니다. height.at (x)를 사용하여 y.at (x)부터 시작하는 막대 또는 오류 막대를 플로팅 할 수 있습니까?
고맙습니다.