QCustomPlot Discussion and Comments

How to use QCustomPlot in the best way for plotting "event density"?Return to overview

There are many (tens of thousands), each with timestamp. They come not smoothly, but often in batches.

I want to use QCustomPlot plotting the "density" (i.e. how many events occured in some unit of time). User should be able to select event from the plot and vice versa. Selecting event on the list of events should be visible on plot (the plot should scroll to that time if it is not visible).

Currently I use the following approach: for each event, create QCPBars with one data point. "x" is timestamp, "y" is number of sibling events with the same rounded-to-seconds timestamp, width (setWidth) is 1/y. Current quick and dirty implementation is here: https://github.com/vi/timelogview.

Maybe there's some better way?

As indicated in the other thread (http://www.qcustomplot.com/index.php/support/forum/283), I'd recommend using a QCPGraph here.