I have a text file where I get my values,
I have a timer which works as an increaser to the x axis so the plot is real time.
here's my code.
void gui::x()
{
int xy = 0;
QVector<double> x(1000), y(1000);
FILE *file;
char line[1024];
file = fopen("x.txt", "r");
while (fgets(line,1024,file) != NULL)
{
fscanf(file,"%lf %lf", &y[xy], &x[xy]);
xy++;
}
fclose(file);
QwtPlotCurve *curve = new QwtPlotCurve;
curve->attach(plot_all[3]);
curve->setData(y,x);
curve->
QwtPlotCurve *curve2 = new QwtPlotCurve;
curve2->attach(plot[3]);
curve2->setData(y,x);
}
the proble is i get a weird second line below my plot.
can anyone help me?