Page 1 of 1

How to add a Histogram

Posted: Wed Oct 01, 2014 12:38 pm
by 10045871
Hello,
This is a new subject. However, I don't know how to make a new post because I didn't find any button other than "postreply".
I want to add a histogram to an existing curve on a chart. The aim is to give a statistic of the data contained in the curve. So, I intend to use a THorizLineSeries to represent the histogram which will show confident range among the values of the curves.
The problem is I didn't find any example to do it.
Could you show me how to add the histogram, connect it to the existing series, set the function to "histogram", set the number of bins (as referred to the Matlab function hist(x,n) where x is the data and n is the number of bins (classes of data)) ?
Please give the example in Delphi.
Thank you in advance

LÊ Minh-Quang
Sciensoria

PS : thank you very much for your support you have given from 2007

Re: How to add a Histogram

Posted: Thu Oct 02, 2014 7:55 am
by yeray
Sciensoria wrote:This is a new subject. However, I don't know how to make a new post because I didn't find any button other than "postreply".
I've split this message you posted in this thread to a new thread here.
To open a new thread, you should go to a forum category (ie VCL / CLX) and click on the "NEWTOPIC" button:
new_topic.png
new_topic.png (63.14 KiB) Viewed 7339 times

Re: How to add a Histogram

Posted: Thu Oct 02, 2014 8:09 am
by yeray
Hello,
Sciensoria wrote:I want to add a histogram to an existing curve on a chart. The aim is to give a statistic of the data contained in the curve. So, I intend to use a THorizLineSeries to represent the histogram which will show confident range among the values of the curves.
The problem is I didn't find any example to do it.
Could you show me how to add the histogram, connect it to the existing series, set the function to "histogram", set the number of bins (as referred to the Matlab function hist(x,n) where x is the data and n is the number of bins (classes of data)) ?
Please give the example in Delphi.
I'd suggest you to read the "Tutorial 7 - Working with Functions", shipped with the binary installation, to understand how the functions work in TeeChart.

Then, you'll find example about the Histogram function at "All features\Welcome !\Functions\Statistical\Histogram" in the Features Demo program also shipped with the binary installation. Look at the "Source Code" and "Form" tabs at the bottom to find all the code (Delphi).
Histogram.png
Histogram.png (165.11 KiB) Viewed 7336 times
Sciensoria wrote:PS : thank you very much for your support you have given from 2007
You are welcome! :)