Mantis Bug Tracker

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000666OLVUser Interfacepublic2012-08-30 13:062012-08-30 13:37
Assigned ToBenFenner 
PlatformAllOSAllOS VersionAll
Product Version0.0.2 
Target Version0.0.5Fixed in Version 
Summary0000666: Make graph trace downsampling (for zoomed out) better.
DescriptionShort lived peaks and valleys are not always displayed.

Right now the way the downsampling works, is that it takes the first chunk of data and finds the min/mean/max and displays the mean as the data point on screen. The next chunk of data is processed to find the min/mean/max and the mean is compared to the last point displayed. If the mean is higher (data is trending up) the max is used to display the next data point. If the mean is lower than the last displayed point (the data is trending down) then the min is used to display the data point. This then repeats down the trace.

This way, most of the peaks and valleys are kept. However, extremely short lived peaks and valleys can be lost in the middle of a chunk if averaging overwhelms it, or if they happen between two chunks.

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
User avatar (0001972)
Fred (administrator)
2012-08-30 13:20

Interesting approach!

What we need is test data ;-)

What about 11 values: 5,5,5,0,5,5,5,10,5,5,5

What should be done there? You've plainly got a peak and a trough of equal weighting, and a bunch of average data. You can't avoid losing something there.

Perhaps some statistical terms to do with spread can be used to fuzzy-logic our way out of it.

Thing is, some may prefer different methods of doing this.

How about this:

Instead of showing one trace when zoomed out, we show three, that would keep it simple and give you a feel for spread too. Base colour for the mean, something a shade lighter for min and darker for max, or similar? Or just base colour for all three, why not.

If the data was smooth, all three would overlap, and produce the base colour again, or a thin line. If the data was wild you'd have three divergent lines showing you so. If it was mostly stable with some speckled noise (the usual case) you'd get mostly converged lines, and the peaks would show through always.

Clearly this is more complex, but thinking about the idea, I REALLY like it, and you don't have to have any real magic, just draw more lines.

Perhaps current code stays as mode A and MMM (min mean max) joins as mode B and perhaps other modes?
User avatar (0001973)
BenFenner (developer)
2012-08-30 13:35
edited on: 2012-08-30 13:36

It looks like what we are going to do is implement three solutions for this and let the user pick. The default will be the current solution which is the single line downsampled with possible loss of peaks and valleys.

The second solution will be Fred's mentioned above with three lines.

The thirds solution will be similar to a gantt chart with a vertical line representing the max/min and maybe a marker denoting the mean.

User avatar (0001974)
Fred (administrator)
2012-08-30 13:36

And maybe more! :-)
User avatar (0001975)
BenFenner (developer)
2012-08-30 13:37

Changed target from "Future" to "0.0.5".

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker