Re: [ROOT] x axis range

From: Krister Bruhwel (bruhwel@jlab.org)
Date: Thu Dec 07 2000 - 20:45:53 MET


Thanks for the reply,
Is there anyway I could con a small example?  I've read up about the 2D
histograms, and I think I know how to create one with this
TH2(name,title,nbinsx,xlow,xup,nbinsy,ylow,yup)  but I'm not sure about how
to place points on the graph to make it look like a line plot.  The
tutorials are all fancier than I need.

Thanks agian,
Krister

Stephen Bailey wrote:

> Hi Krister.
>
> I frequently draw a dummy blank 2D histogram just to get the
> axes I want, and then draw things like graphs or scatter plots
> on top of it using the "same" option.  I think this accomplishes
> what you want.
>
> Stephen
>
> On Thu, 7 Dec 2000, Krister Bruhwel wrote:
>
> > I'm new to Root and I'm trying to make line graphs with a set Y and X
> > range so that I can visually compare graphs (same xy axis on all
> > graphs).  I
> > 've found that
> >               TGraph *graph = new TGraph(inTime.size(), x_value,
> > y_value);
> >               graph->GetXaxis()->SetMinimum(10.0);
> >               graph->GetXaxis()->SetMaximum(100.0);
> >
> > sets the Y axis range.  How can I set the X axis range?  I've searched
> > the Root Talk and have not had any luck.
> >
> > Thanks for any help,
> > Krister
> >



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:38 MET