Hi QWT Forumers!
I'd like to draw 2d array data and it is my first experience with QWT, everything is OK, but the following code is drawing only ONE(last) curve. Dear fellowship, please help !
Code:
Plot::Plot() { setTitle("A Simple QwtPlot Demonstration"); // Set axis titles setAxisTitle(xBottom, "x -->"); setAxisTitle(yLeft, "y -->"); // Insert new curves #if QT_VERSION >= 0x040000 #endif cSin->attach(this); const int nPoints = 100; double x[2][nPoints], y[2][nPoints]; for(int j=0; j<2; j++) { for(int i=0; i<nPoints; i++) { x[j][i] = -3.14 + i*(j+2)*3.14/(nPoints-1); y[j][i] = sin((j+1)*x[j][i]); } } // Create 2d array data for(int j=0; j<2; j++) cSin->setData(x[j],y[j],nPoints); }

