Re: Putting bounderies on plot

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Mar 13 1998 - 17:20:52 MET


sven schagen wrote:
> 
> Dear All,
> 
> In my datafile (a converted hbook file) I have the coordinates of
> conversion point in an event. I would like to plot these in order to see
> what dead material is there (of course I know this, but just to check
> the data).
> The most simple option to do this is, of course, a simple Draw
> statement.
> Something like:
> 
>         TFile f = new TFile("./other/dis96_06.root");
>         h1.Draw("y_conv:x_conv","conditions blah");
> 
> However, I then get a plot in which the axes run from -80 to 80, for
> both the x and the y axis.
> I would like a detailed plot of the range -40 to 40, also both on the x
> and y axis.
> I found a type on how to do this, however, this doesn't seem to work.
> Can anybody please tell me how I should do this.
>
You can specify teh boundaries of teh histogram used by h1.Draw.
For example:
   TH2F *h2 = new TH2F("h2","blabla",80,-40,40,80,-40,40);
   h1.Draw("Y:x>>h2","conditions")

For more details, see URL:
   http://root.cern.ch/root/HowtoReadTree.html

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:31 MET