you have the solution in your code already:

Qt Code:
  1. QwtPlot *plot=new QwtPlot();
  2. plot->setTitle( "Plot Demo" );
  3. plot->setCanvasBackground( Qt::white );
  4. //plot->setAxisScale( QwtPlot::yLeft, 0.0, 20.0);
  5. // plot->setAxisScale(QwtPlot::xBottom, 0.0, 20.0);
  6. plot->insertLegend( new QwtLegend() );
  7. plot->setAxisTitle(QwtPlot::xBottom, "X Axis");
  8. plot->setAxisTitle(QwtPlot::yLeft, "Y Axis");
  9. QwtPlotGrid *grid = new QwtPlotGrid();
  10. grid->attach( plot );
  11. grid->setPen( Qt::gray, 0.0, Qt::DotLine );
  12.  
  13. QwtPlotCurve *curve = new QwtPlotCurve();
  14. curve->setTitle( "Pixel Count" );
  15. curve->setPen(QPen(Qt::blue, 3,Qt::SolidLine) );
  16. curve->setRenderHint( QwtPlotItem::RenderAntialiased, true);
  17. QwtSymbol *symbol = new QwtSymbol( QwtSymbol::Ellipse,QBrush(Qt::yellow),QPen(Qt::red,2),QSize(8,8));
  18. curve->setSymbol(symbol );
  19.  
  20. QPolygonF points;
  21. curve->setSamples( points );
  22. curve->attach( plot );
  23.  
  24. QList<QByteArray> read_data;
  25. b1= process->readAllStandardOutput();
  26. read_data=b1.split('\n');
  27. int i=0, n=read_data.count();
  28. float y[100000];
  29.  
  30. for( i=0; i<n; i++ )
  31. {
  32. QString result=read_data.at(i);
  33. result.remove(0,10);
  34. qDebug("%s",result.toLatin1().data());
  35. y[i]=result.toLatin1().toFloat();
  36. points << QPointF( i, y[i] );
  37. // check wether curve is updated, if not do it here
  38. plot->replot;
  39. plot->show;
  40. }
To copy to clipboard, switch view to plain text mode 

Qwt is not installed on the computer I am writing from, so I cannot check my code, but the solution might not be far from here.

Just a remark. Converting a byte array to a string and then to a float is heavy, there should be a better way to do that. How fast is your data input rate?