RE: Problem with backgroud color

From: Olivier Couet <Olivier.Couet_at_cern.ch>
Date: Mon, 27 Apr 2009 14:49:15 +0200


I like the white backgourn also and my rootlogon.C is:

{

   gStyle->SetCanvasColor(0);
   gStyle->SetFrameBorderMode(0);
   gStyle->SetStatBorderSize(1);
   gStyle->SetFrameFillColor(0);
   gStyle->SetTitleFillColor(0);

}

-----Original Message-----
From: owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch] On Behalf Of Joern Wuestenfeld Sent: Monday, April 27, 2009 2:45 PM
To: roottalk_at_root.cern.ch
Subject: [ROOT] Problem with backgroud color

Hi,

I'm using the current production release 5.22.00a under Linux and have a problem with changing the background color on a histogram. The background is always filled with light gray, regardless of what I try to set:

void test(void)
{

    TCanvas *c1;
    TH1F *histogram;

    c1 = new TCanvas("test","test",100,100,1024,768);     histogram = new TH1F("a","a",200,-0.2,0.2);

    c1->SetFillColor(10);
    c1->SetFillStyle(0);
    c1->GetFrame()->SetFillColor(10);
    c1->GetFrame()->SetFillStyle(4000);

    histogram->SetFillColor(10);
    histogram->SetFillStyle(0);

    c1->cd();
    histogram->Draw();
}

I tested nearly all combinations of the above commands, but no way. Only If I click in the canvas and select Frame->SetFillStyle I can change the color to white.
Any idea what I'm doing wrong?

Regards,

Jörn Received on Mon Apr 27 2009 - 14:49:22 CEST

This archive was generated by hypermail 2.2.0 : Mon Apr 27 2009 - 17:50:02 CEST