The problem is that When I was trying to use ui->customPlot->saveJpg(filename)
The preserved jpeg image only consists the axis(like Xlabel, yLabel). However, I have also done some plotting based on the axis.
ui->customPlot->addGraph();
ui->customPlot->xAxis->setLabel("Time");
ui->customPlot->yAxis->setLabel("Amplitude");
ui->customPlot->graph(0)->setData(x,y);
I have no idea why the curve is invisible.
Any helps would be appreciated. Thank you!