Generating histograms from functions


I’m generating a 1D histogram from a 1D user-defined function, so I’ve written:

 TF1 *f1 = new TF1 ("f1", "1/((x-[0])^2+([1]/2)^2)", -5., 5.);

This works fine except I want to control the number of bins which the function is spread over. At the moment the function is spread over about 15 bins, but I’d like it to be devided into about 50 bins. How do I get more control over this Histogram?

I’m using version 4.01/02.

Thank you,


should make it