Re: [ROOT] TGraph.

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Jan 15 2001 - 09:39:16 MET


Hi Giuseppe,
You can use a 2-d histogram to draw the frame instead.
See my mods in your example.

Rene Brun

Giuseppe.LoRe@ct.infn.it wrote:
> 
> Hi Rooters,
> I use a macro like the following:
> 
> {
> Float_t diff[] = {0.00069*10000, 0.00085*10000, 0.00085*10000,  0.0008*10000};
> Float_t res[] = {9.00012e-04*10000, 6.57761e-04*10000,  5.67896e-04*10000, 5.04990e-04*10000};
> Float_t molt[] = {17300, 40000, 60000, 84210};
> Float_t emolt[] = {0, 0, 0, 0};
> c1 = new TCanvas();
> //TH1F *hr = c1->DrawFrame(-1,-4,100000,20);
  TH2F *frame = new TH2F("frame","",2,-1,100000,2,-4,20);
  frame->Draw();
> TGraphErrors *asparVsZtrue_gr1 = new TGraphErrors(4, molt, diff, emolt, res);
> asparVsZtrue_gr1->SetMarkerStyle(20);
> asparVsZtrue_gr1->Draw("P");
> }
> 
> Because of the negative value -4 in DrawFrame, TGraph draws an orizontal
> line at y=0 (see attachment).
> How could I evoid that?
> Regards,
> Giuseppe Lo Re.
> 
>   --------------------------------------------------------------------------------
> 
>                     Name: grafico.ps
>    grafico.ps       Type: Postscript Document (APPLICATION/PostScript)
>                 Encoding: BASE64



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