hello.

I have a source of data that is displayed in real time. the x-axis is current coordinate and it varies randomly (depending on the speed and direction). so for chart on the x-axis I'm using the current number of points, and replace it when displayed on the coordinate in QwtScaleDraw:
Qt Code:
  1. // in QwtPlotCurve *pcd I fill data:
  2. for (int i = 0; (i < data.length); i++){
  3. xAlias[i] = i;
  4. x[i] = data_x[i];
  5. y[i] = data_y[i];
  6. }
  7. setSamples(xAlias, y, data.length);
  8.  
  9. // in QwtScaleDraw I take real value by alias:
  10. QwtText myQwtScaleDraw::label(double v) const
  11. {
  12. return QString("%1").arg(pcd->x[((int)v)]);
  13. }
  14.  
  15. // in main Widget:
  16. myPlot->setAxisScale(QwtPlot::xBottom, 0, data.length, 0);
  17. myPlot->replot();
To copy to clipboard, switch view to plain text mode 

but this only works if there is a change of xAlias[]. if I change the array x referenced by the xAlias, repainting occurs.
how to make a graph to be redrawn manually?
myPlot->repaint(), myPlot->update(), myPlot->axisWidget( QwtPlot::xBottom )->update(); does not work too.

Thanks in advance.