Re: [ROOT] About grids on contour plot

From: Olivier Couet (Olivier.Couet@cern.ch)
Date: Thu Feb 26 2004 - 09:56:09 MET


On Wed, 25 Feb 2004, ew fgff wrote:

> Hi,
> 
> I have two questions. I couldn't find its answer.
> 
> 1.  I have plotted a contour plot by TF2. I want to
> change the number/position of grid lines. I tried with
> 
> gr->GetXaxis()->SetNdivisions(80 + 100*4);
> 
> It works for 1-d TGraph. But it did not work for
> contour.


for me it is working. I have tried:

{
   gROOT->Reset();
   TCanvas *c1 = new TCanvas("c1","Test",0,0,600,600);
   fun2 = new TF2("fun2","x+y",0,3,0,3);
   fun2->GetXaxis()->SetNdivisions(80 + 100*4);
   fun2->Draw("cont");       
}

> 2.  In the above contour plot, I want to print the
> values of the function (which corresponds to different
> lines) on the plot.                                 
> 
> Could you please suggest me how to do this.

For the time being none of the contour options are able to do that 
automatically.

 Cheers,          O.Couet

-- 
Org:    CERN - European Laboratory for Particle Physics.
Mail:   1211 Geneve 23 - Switzerland                     Mailbox: J25910      
E-Mail: Olivier.Couet@cern.ch                            Phone:   +41 22 7676522
WWW:    http://cern.ch/Olivier.Couet/                    Fax:     +41 22 7677155



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET