我定义了x 和 y来存放坐标数据,画完图之后,如何将数据导出到txt中,,求大神告知
QVector<double> x(101),y(101);//分别存放x和y坐标的数据,101为数据长度
for(int i=0;i<101;i++) { x=i+3; y=1000/x; } ui->qCustomPlot->addGraph(); ui->qCustomPlot->setInteractions(QCP::iRangeDrag | QCP::iRangeZoom); ui->qCustomPlot->graph(0)->setData(x,y); ui->qCustomPlot->xAxis->setLabel("x"); ui->qCustomPlot->yAxis->setLabel("y"); ui->qCustomPlot->xAxis->setRange(0,11); ui->qCustomPlot->yAxis->setRange(0,110);