PDA

View Full Version : How display an histogram?



kid17
23rd November 2008, 22:02
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

high_flyer
24th November 2008, 10:35
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)

kid17
24th November 2008, 13:28
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?

aamer4yu
24th November 2008, 16:22
May be you shud look at Qwt (http://qwt.sourceforge.net/)