problem with y-scale (a bug?)

From: Hajo Molegraaf <hjausenet_at_hotmail.com>
Date: Thu, 19 Jan 2006 17:05:06 +0100


Hi,

I like the TreeViewer for TNtuples that can be lanched from the TBrowser, but the y-range of a plot can not be set properly using the GUI.

With the following script I create a root file

//************************

{

   TFile* file = new TFile("test.root","RECREATE");    TNtuple* data = new TNtuple("data","","Temperature:Resistance");    double T, R;
   for( T = 10.0; T < 300.0; T += 1.0 )
   {

       R = T*T;
       data->Fill(T,R);

   }

   file->Write();
   file->Close();
}

//*************************

I can open this root file in the TBrowser and I can view the TNtuple with the TreeViewer. I drag the Temperature branch to X and the Resistance branch to Y and I click on the button to draw the graph. This creates a nice graph, but I want to have a logaritmic y-scale. So I click on the canvas and choose SetLogy. This changes the y-scale from around 2.5e3 to 1e5. Well, I want to see all the data, so I click on the y-axis and select SetRangeUser. I fill in 10 for ufirst and 1e7 for ulast. This changes the y-range from 3e5 to 1e7.

How can I change the y-range? I know I can do it with a script using SetLimits, but it seems that using only the GUI it does not work properly. Is it not possible to use SetRangeUser for this? Why does it respond so strange?

By the way, is it an idea to add SetLimits to the popup menu for the axis by adding '// *MENU*' to the function SetLimits in include/TAxis.h ?

I'm using ROOT Version 5.09/01 16 December 2005, Compiled for linux after downloading the CVS version.

Thanks,
Hajo Molegraaf



Nieuw op MSN Messenger 7.5: Dynamische achtergronden http://www1.imagine-msn.com/Messenger/Audio.aspx Received on Thu Jan 19 2006 - 17:05:13 MET

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:56 MET