[Qt-interest] What to use as a base class for histogram classes?

Stephen Jackson spjackson42 at gmail.com
Mon Sep 21 21:02:38 CEST 2009


On Mon, Sep 21, 2009 at 7:47 PM, James Matta  wrote:
> I am working on writing a data analysis tool for my research and I need to
> be able to display 1D and 2D histograms (see attachments for examples).
> Users need to be able to do things like click within the histogram and have
> the position recorded (so that they can give initial values for peak fits,
> identify channel number/ number of counts etc more finely than the scale
> might give, highlight regions of interest, etc.)
>
> My first thought was to subclass out of QPainter or QPaintDevice or one of
> their subclasses; but, I am uncertain of whether or not this is the best
> choice, or even if it is a good choice. I would appreciate any advice that
> you might have on the subject.
>

Have you looked at the Qwt library? http://qwt.sourceforge.net/

There is a screenshot of a histogram.
http://qwt.sourceforge.net/histogramscreenshots.html

If it doesn't do exactly what you want, I think you should get some
good ideas from it.

-- 
HTH,

Stephen Jackson



More information about the Qt-interest-old mailing list