On Wednesday 21 May 2008 06:50, pamela fluente wrote:
> ... [PEB] I am plotting on a chart a series of values.
>
> These values arrive irregularly but continuosly, during a long
> timespan, one after another
> (for instance 1 each second or 2) and they may be a few millions of
> values.
>
> I have to recreate a real time plot of these points every few
> seconds.
>
> The problem is that I need:
>
> 1. My list of values in memory, used to draw the chart, cannot
> exceed, say, 500 values.
> 2. Represent the values observed up to a given time, clearly
> sampled, but without (big distortions)
You might try box plots
http://en.wikipedia.org/wiki/Box_plot
As you get more values, add them to the latest box, and add a new box
when the time span (or count) is done. When your memory is "full",
double the time span (or count) that each box represents and combine
pairs of boxes. For instance, you might approximate the median as the
average of the medians of the boxes combined.
-paul-


|