Re: [ROOT] Getting TGraphErrors objects drawn after reading them from a file...

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Feb 23 2001 - 17:21:21 MET


Hi Thomas,
You forgot to specify teh option "a" when drawing the graph.
  g->Draw("ap"); for example.

The option "a" will compute theg pad range and draw a frame

Rene Brun

Thomas Feser wrote:
> 
> Hi again,
> 
>   I fortunately managed now to store my TGraphErrors objects properly into
> a root file. (I posted that question yesterday.)
> 
>   The problem now is:
>   I can't draw them the way I'd like to have it.
>   My steps are:
>   - After starting CINT, I say
>   - TFile *myfile = TFile::Open("myfile.root")
>   - myfile->cd();
>   - TGraphErrors *g = NULL;
>   - g = (TGraphErrors*) myfile->Get("my_TGraphErrors_Object");
> The pointer g does not point to 0 after this step any more, therefore the
> object seems to have been found. However, both
>   - g->Draw();
> and
>   - g->Draw("P");
> produce an empty default "TCanvas"es only. Am I missing an important step
> here?
> 
>   I can draw the graph by clicking through the TBrowser menus, but in the
> root versions I'm using (I tried 2.24.04 and 2.25.03) the DrawPanel for
> graphs is not yet included. So I can't get rid of the lines between the
> points that are drawn by default, which I have to.
> 
>   Thanks in advance,
>   _
>   |om
> 
> ------------------------------------------------------------------------
> -     Thomas Feser                                                     -
> -                                                                      -
> -     Institut fuer Physik                phone: +49-6131-39-25165     -
> -     ETAP/AMANDA                           fax: +49-6131-39-25169     -
> -     Staudingerweg 7 / 04-426                                         -
> -     D-55099 Universitaet Mainz                                       -
> -                                                                      -
> -     Thomas.Feser@uni-mainz.de                                        -
> -     http://iphcip1.physik.uni-mainz.de/~tfeser                       -
> ------------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:37 MET