[quote]also using my method is there anyway to set things like the start and end of the axis?
[/quote]Yes … see the TTree::Draw documentation.
[quote]i know there is a way you can do this by reading in entrys and filling the histogram using a loop. could someone please explain how i might do this. [/quote]Yes … use a TSelector see the documentation for TTree::Selector.
You may also want to re-read the ROOT Users’ Guide. In particular the chapter on TTree analysis.
If you want to specify your own bining, xmin, xmax, you can do
a->Draw(“id>>hid(50,0,500)”);
This will force the output histogram “hid” to have 50 bins with xmin=0 and xmax=500