Re: [ROOT] Problem with TGaxis

From: Rene Brun (
Date: Fri Jun 06 2003 - 22:30:37 MEST

Hi Marco,

I have modified the logic to draw your last histogram.
Up to you to apply similar changes to the other histograms.
See examples in the TGaxis constructor accepting a TF1*.


   xmin = h3->GetXaxis()->GetXmin();
   xmax = h3->GetXaxis()->GetXmax();
   ymin = h3->GetYaxis()->GetXmin();
   TF1 *f_1= new TF1("f_1","-x",-xmax,-xmin);
   TGaxis *xnew= new TGaxis(xmin,ymin,xmax,ymin,"f_1",510);

Rene Brun

On Fri, 6 Jun 
Marco Ajello wrote:

> Dear all,
> I have a problem with TGaxis.
> Find attached the root file + data,
>  to try:
> launch >.x w28bk.C
> -write at the first question: p.dat (<--the name of data file)
> and then enter,
> at the other question give a letter (like "t") and enter.
> You will see an histo 2D. The axis I would like to have is
>  the original changed of sign.
> I.Eg.: the original goes from -9.5->-3.5
>        I need            from  9.5->3.5
> I do know why this macro run with some data and not with these one.
> Can you help me?
> Regards,
> Marco

This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET