Discussion:
Can I use QwtPlot to plot while data is created?
Ole Jacob
2007-11-02 15:23:01 UTC
Permalink
Hi,

I'm planning on using QwtPlot to create a graph while the data is created,
meaning I will add one and one point and have the QwtPlot continously update.

Is QwtPlot up to this, or will it not work/be very slow?

Regards,
Ole Jacob
Uwe Rathmann
2007-11-04 09:56:17 UTC
Permalink
Post by Ole Jacob
I'm planning on using QwtPlot to create a graph while the data is created,
meaning I will add one and one point and have the QwtPlot continously update.
Is QwtPlot up to this, or will it not work/be very slow?
Have a look at the realtime example: it generates and paints random points one
by one. ( For X11 some optimizations are missing in Qwt 5.0.2. So better take
the code from qwt-5.0 SVN, or wait for the Qwt 5.0.3 maintenance release,
what is planned for next week )

The example does an incremental painting of points, what should work fine with
Qt3 on all platforms. With Qt4 you will see a similar performance on X11, on
Windows the performance is worse, but also ok. But on the Mac incremental
painting is not possible, what makes the performance lousy.

Uwe
Houssem BDIOUI
2007-11-05 07:38:38 UTC
Permalink
Uwe,
Post by Uwe Rathmann
With Qt4 you will see a similar performance on X11, on
Windows the performance is worse,
Is there any plan to improve the performance on Windows? Or is
it related to Qt itself?

Best regards,
Houssem
Post by Uwe Rathmann
Post by Ole Jacob
I'm planning on using QwtPlot to create a graph while the data is
created,
Post by Ole Jacob
meaning I will add one and one point and have the QwtPlot continously update.
Is QwtPlot up to this, or will it not work/be very slow?
Have a look at the realtime example: it generates and paints random points one
by one. ( For X11 some optimizations are missing in Qwt 5.0.2. So better take
the code from qwt-5.0 SVN, or wait for the Qwt 5.0.3 maintenance release,
what is planned for next week )
The example does an incremental painting of points, what should work fine with
Qt3 on all platforms. With Qt4 you will see a similar performance on X11, on
Windows the performance is worse, but also ok. But on the Mac incremental
painting is not possible, what makes the performance lousy.
Uwe
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
qwt-interest mailing list
https://lists.sourceforge.net/lists/listinfo/qwt-interest
Uwe Rathmann
2007-11-05 08:21:46 UTC
Permalink
Post by Houssem BDIOUI
Is there any plan to improve the performance on Windows? Or is
it related to Qt itself?
It is related to Qt4:

a) X11

On X11 you can paint outside of paint events ( QwtPlotCurve does it, when
Qt::WA_PaintOutsidePaintEvent is enabled for the canvas ).

b) Windows

On Windows Qt::WA_PaintOutsidePaintEvent is not supported. So QwtPlotCurve
needs to send a dummy paint event to draw the points from inside the paint
event ( running through Qt4 render pipeline ).

c) Mac

On the Mac incremental painting is not supported at all and the pixmap cache
of the canvas needs to be repainted for each paint operation.

Something we have to pay for the exciting new world of transparent desktops,

Uwe

Loading...