Re: Persistence with QwtPlot
Not sure if I completely got what you are trying to do, but let's try: at some rate - let's say every second - you receive a data set from somewhere, that you need to display as a curve. Then you have some period in time - let's say 10 seconds - where you want to display previous curves. To indicate that data is from the past you decrease the alpha value of the corresponding curve pen, right ?
Implementation for this would be easy - simply store the date of each data set and start a timer, that updates the curve pen each second and removes curves, when the alpha value goes below 0.
You wrote about expecting performance/memory issues, because of having too many curves with this approach. Here you need to be more specific about what refresh rate and amount of lines we are talking about.
Concerning your idea of rendering curves to an image: you would have to iterate over all pixels of this image for each replot decrementing the alpha values, before drawing the new curve on top. Implementation is not very difficult and could be done multithreaded, but of course only doable if there is nothing else on the plot ( like grid lines ). Advantage of this approach is that you have a known penalty for updating the alpha values - independend from the number of curves/samples. Disadvantage is of course, that you always have this penalty and for environments, where you don't run the raster paint engine you would turn vector graphics into raster graphics, what means: no hardware acceleration in case of OpenGL or Qt4/X11 ( remote X11 will just suck ), and unscalable output in case of PDF.
Uwe
1 Attachment(s)
Re: Persistence with QwtPlot
Uwe,
Yep, that's exactly what I want to do.
As far as update rate, I'm looking at 10-30 updates a second, and a 10-20 second persistence. I guess I could limit the update rate and persistence time to make option 1 more feasible. I'll give it a shot.
Eventually, however, I'd like to implement something of this sort:
Attachment 11114
for spectrum monitoring. I can do this with a raster plot, but not efficiently.