Results 1 to 4 of 4

Thread: How display an histogram?

  1. #1
    Join Date
    Nov 2008
    Posts
    17
    Thanks
    2

    Default How display an histogram?

    Hello, i am getting started with qt and i have a problem.
    I have an array with 256 values, i want show this array as an histogram image.How can i do?Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How display an histogram?

    You assign each of your 256 values to the Y (vertical) coordinate, while you assign the index to the X (horizontal) coordinate. (that is the usual way)
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Nov 2008
    Posts
    17
    Thanks
    2

    Default Re: How display an histogram?

    Quote Originally Posted by high_flyer View Post
    You assign each of your 256 values to the Y (vertical) coordinate, while you assign the index to the X (horizontal) coordinate. (that is the usual way)
    This I know. But what class should I use to have a structure as you said yourself, which I do see the histogram as a graphic?

  4. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How display an histogram?

    May be you shud look at Qwt

Similar Threads

  1. OS/X how to get physical display handle
    By hvengel in forum Qt Programming
    Replies: 4
    Last Post: 3rd January 2009, 19:51
  2. can Qlabel display a series of image one by one ?
    By jirach_gag in forum Qt Tools
    Replies: 3
    Last Post: 11th August 2008, 15:36
  3. Request Qwt histogram design advice
    By goes2bob in forum Qwt
    Replies: 1
    Last Post: 10th April 2008, 10:12
  4. Display only PNG image on desktop
    By durbrak in forum Qt Programming
    Replies: 32
    Last Post: 15th March 2008, 21:55
  5. Graphics view display problem.
    By kiranraj in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2007, 07:08

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.