RE: [ROOT] SetFillStyle(3007) seems not to work

From: Olivier Couet (couet@mail.cern.ch)
Date: Fri Aug 20 2004 - 09:40:03 MEST


Hi Bernd,

 The PS files you sent me reflect exactly what is produced on the screen 
in the Pad. Seems to me you encountered the well known gv bug which is 
explained here: http://couet.home.cern.ch/couet/root/ht09.html

Cheers,       Olivier

On Thu, 19 Aug 2004, Bernd Reinhold wrote:

> 
> Hi Olivier!
> 
> This script (in CINT: .x test.c) produces the attached eps-files, the one with SetFillStyle(3007) has neither red anymore, and nor a pattern.
> 
> Int_t test(){
> TCanvas myCanvas("myCanvas", "a beautiful canvas", 600, 400);
> myCanvas.SetFillColor(0);
> TFile *F=new TFile("hsimple.root");
> TNtuple *T=(TNtuple*)F->Get("ntuple");
> Int_t n=T->Draw("px>>h_all","");
> TH1D *h_all=(TH1D*)gDirectory->Get("h_all");
> h_all->SetFillColor(kRed);
> myCanvas.SaveAs("withoutSetFillStyle.eps");
> h_all->SetFillStyle(3007);
> myCanvas.Modified();
> myCanvas.SaveAs("withSetFillStyle.eps");
> }
> 
> ROOT 3.10/02, April 04, CERN RedHat Linux 7.3
> 
> Thanks, Bernd.
> 
> -----Original Message-----
> From:	Olivier Couet
> Sent:	Thu 8/19/2004 3:25 PM
> To:	Bernd Reinhold
> Cc:	roottalk@pcroot.cern.ch
> Subject:	Re: [ROOT] SetFillStyle(3007) seems not to work
> 
> Hi Bernd,
> 
>  Can you send a small example reproducing the problem ?
> 
>  Cheers,       Olivier
> 
> 
> On Thu, 19 Aug 2004, Bernd Reinhold wrote:
> 
> > Hi!
> > 
> > The following codelines are part of a compiled c++-program.
> > 7 histograms are drawn into the same canvas. One of the last is h1:
> > These three lines work, and eventually the setfillstyle0.eps is generated
> > TFile F=new (...);
> > TH1D *h1=(TH1D*)F->Get("b");
> > h1->SetFillStyle(0);
> > 
> > However the following doesn't work, see setfillstyle3007.eps:
> > TFile F=new (...);
> > TH1D *h1=(TH1D*)F->Get("b");
> > h1->SetFillStyle(3007);
> > 
> > You're help is very much appreciated.
> > 
> > Thanks, Bernd.
> > 
> > 
> > 
> > 
> 
> 

-- 
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:09 MET