This is my code :
Qt Code:
  1. Plot::Plot(QWidget *parent):
  2. QwtPlot(parent)
  3. {
  4. tab_x[0] = 0; tab_x[1] = 200; tab_x[2] = 400; tab_x[3] = 600; tab_x[4] = 1600; tab_x[5] = 2000;
  5. tab_x[6] = 2400; tab_x[7] = 2800; tab_x[8] = 3200; tab_x[9] = 3600; tab_x[10] =
  6.  
  7. tab_y[0] = mygamma(tab_x[0],4096,1023,0.5);
  8. tab_y[1] = mygamma(tab_x[1],4096,1023,0.5);
  9. tab_y[2] = mygamma(tab_x[2],4096,1023,0.5);
  10. tab_y[3] = mygamma(tab_x[3],4096,1023,0.5);
  11. tab_y[4] = mygamma(tab_x[4],4096,1023,0.5);
  12. tab_y[5] = mygamma(tab_x[5],4096,1023,0.
  13. tab_y[6] = mygamma(tab_x[6],4096,1023,0.5);
  14. tab_y[7] = mygamma(tab_x[7],4096,1023,0.5);
  15. tab_y[8] = mygamma(tab_x[8],4096,1023,0.5);
  16. tab_y[9] = mygamma(tab_x[9],4096,1023,0.5);
  17. tab_y[10] = mygamma(tab_x[10],4096,1023,0.5);
  18.  
  19. int nb_points = sizeof(tab_x) / sizeof(tab_x[0]);
  20. QPolygonF points,points2;
  21. for ( int i = 0; i < nb_points ; i++ )
  22. {
  23. points += QPointF(tab_x[i], tab_y[i]);
  24. }
  25.  
  26. m_Curve = new QwtPlotCurve();
  27. m_CurveFitter = new QwtSplineCurveFitter();
  28.  
  29. m_Curve->setCurveAttribute(QwtPlotCurve::Fitted, true); // Otherwise I have got Lines and not smooth curve the fitted curve is better for me
  30. m_Curve->setStyle(QwtPlotCurve::Lines);
  31.  
  32. m_CurveFitter->setFitMode(m_CurveFitter->ParametricSpline);
  33. m_CurveFitter->setSplineSize(4096); // from my orignal 10 points I want 4096 points
  34.  
  35. m_Curve->setCurveFitter(m_CurveFitter);
  36. m_Curve->setData(tab_x, tab_y, sizeof(tab_x) / sizeof(tab_x[0]));
  37. m_Curve->attach(this);
  38. }
  39.  
  40.  
  41.  
  42. QPolygonF Plot::getPoints(int nCurve)
  43. {
  44. QPolygonF points,InterpolatedPoints;
  45. m_Curve;
  46. m_CurveFitter
  47.  
  48. for ( int i = 0; i < m_Curve->dataSize(); i++ )
  49. {
  50. points += QPointF(m_Curve->x(i), m_Curve->y(i));
  51. }
  52.  
  53. InterpolatedPoints = curveFitter->fitCurve(points);
  54.  
  55. return InterpolatedPoints;
  56. }
  57.  
  58.  
  59. double mygamma(double in,int nbpoints_in,int nbpoints_out,double gma)
  60. {
  61. double x = in / nbpoints_in;
  62.  
  63. return (pow(x,gma) * nbpoints_out );
  64. }
To copy to clipboard, switch view to plain text mode 

So I have to setCurveAttribute(QwtPlotCurve::Fitted, FALSE ); ?? I that case my curve is totally not smooth...
I don't understand how Qwt can trace a curve, and one cannot access the points of that curve...

I do understand in my code that the Interpolated points that I retrieve are not the one traced on my graph ..the Fitted parameter should change this ...but I need it.