Re: [ROOT] no TF1 y axis mouse zoom

From: Rene Brun (Rene.Brun@cern.ch)
Date: Sat Jun 29 2002 - 19:20:45 MEST


Hi Ben,

Zooming the Y axis of a TF1 was not implemented.
It is now implemented in the CVS version.

Thanks for this remark.

Rene Brun


On Thu, 27 Jun 2002, Ben Kilminster wrote:

> Hi,
> 
> Is there a reason one can't use the mouse to zoom in on the y axis of a
> TF1 ?
> 
> Here is an example where one can zoom in on the x and y axis with the
> mouse for a TGraph,  but not so for a TF1.  (root v3_02_07c, Linux+2.2)
> 
> {
> new TCanvas();
> c1->Divide(1,2);
> 
> // Make a graph 
> int N = 100;
> int i = 0;
> double X[N], Y[N];
> for (double d = -5; d < 4.9; d+= 0.1)
> {
> X[i] = d;  
> Y[i] = (d+0.5)*(d+0.5)+ 3.0 ;
> i++;
> }
> TGraph *G = new TGraph(N,X,Y);
> c1->cd(1);
> // I can zoom the x and y axes with the mouse
> G->Draw("AC");
> 
> // Make a function
> TF1 *F = new TF1("F","(x+0.5)*(x+0.5)+3.0",-5,5);
> c1->cd(2);
> // I can only zoom the x axis with the mouse
> F->Draw();
> 
> // But the following work
> // F->SetMinimum(2);
> // F->SetMaximum(7);
> 
> }
> 
> 
> Cheers,
> Ben
> 
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:58 MET