Results 1 to 2 of 2

Thread: Plotting a Standart Normal Distribution curve

  1. #1
    Join Date
    Aug 2012
    Posts
    1
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Plotting a Standart Normal Distribution curve

    Hello,

    I've been using QwtPlotHistogram in my application for a while, and recently a new feature was requested. The idea is to always (or, at the very least, provide an option to) plot a Normal Distribution curve along with the histograms.

    Something like this: BinomialGaussian_1000.gif

    I was wondering if qwt already provides any function related to this, if so, I'd rather use it. If not, does anyone have any hints as to how implement this? For now, I'm using std::normal_distribution to generate the values based on a previously calculated mean and standart deviation, but I'm wondering if there is a faster way to implement this based solely on QwtPlot coordinates instead of calculating so many values.

    Any help or hints are greatly appreciated.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,312
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Plotting a Standart Normal Distribution curve

    In case of QwtPlotHistogram you have a vector of (x1, x2, y ) samples that of course could be mapped to vector of ( x1 + 0.5 * ( x2 - x1 ), y ) points and being plotted as a curve.
    But this sounds so trivial, that I'm wondering if this is really all you are looking for ?

    Uwe

Similar Threads

  1. Quadratic curve plotting in Qt
    By shivendra46d in forum Newbie
    Replies: 4
    Last Post: 11th October 2013, 07:58
  2. Fast curve plotting
    By Cruz in forum Qt Programming
    Replies: 4
    Last Post: 3rd January 2012, 11:35
  3. Problem in plotting curve
    By johnMick in forum Qwt
    Replies: 1
    Last Post: 5th August 2011, 10:09
  4. Replies: 4
    Last Post: 6th October 2010, 13:29
  5. Plotting part of a curve
    By viridis in forum Qwt
    Replies: 6
    Last Post: 21st July 2008, 08:12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.