Olivier,
Yes, this is getting me MUCH closer, thanks. However, if zoom, I
sometimes get rather severe fill artifacts - examples:
zoom from x=1.3 to 1.9: artifact in red region only
zoom from x=1.6 to 2.4: artifact in red and yellow, green is fine
zoom from x=1.8 to 2.2: artifact in red, yellow and green
zoom from x=2 to 2.8: no artifact
Ed
> -----Original Message-----
> From: Olivier Couet [mailto:Olivier.Couet@cern.ch]
> Sent: Thursday, July 24, 2003 9:46 AM
> To: Ed Oltman
> Cc: Roottalk@Pcroot. Cern. Ch
> Subject: Re: [ROOT] TF2::Draw() question
>
>
>
> Hi Ed,
>
> try this:
>
> {
> TCanvas *c = new TCanvas("c","Contours",0,0,800,700);
> TF2 *f2 = new
> TF2("f2","0.1+1000*((1-(x-2)*(x-2))*(1-(y-2)*(y-2)))",1,3,1,3);
> f2->SetFillStyle(1000);
> f2->SetLineWidth(1);
> double contours[3];
> contours[0] = 500;
> contours[1] = 700;
> contours[2] = 900;
> f2->SetContour(3,contours);
> Int_t colors[3] = {kRed, kYellow, kGreen};
> gStyle->SetPalette(3,colors);
> f2->Draw("cont0"); // Draw the fill area contour
> f2->Draw("cont3 same"); // draw the line contour on top
> }
>
> Cheers, Olivier
>
>
>
> On Thu, 24 Jul 2003, Ed Oltman wrote:
>
> >
> > Hello,
> >
> > I am using root 3.05/5 on Win2k. I have a TF2 object which I
> can Draw() and
> > manipulate (e.g. zoom, add other object to it, etc...) IF I use
> > Draw("cont4"), I get a beautiful plot, but I cannot zoom or
> draw objects on
> > top of - perhaps because, according to THistPainter doc, its really a
> > surface plot with theta=0.
> >
> > THistPainter doc says that "cont3" uses "fill area colors" How
> do I set the
> > colors between the countours as they are in the "cont4" option.
> When I draw
> > with "cont3" option, all fill areas are white. Thanks..
> >
> > Ed
> >
> >
> >
>
> --
> 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 : Thu Jan 01 2004 - 17:50:13 MET