Problem with backgroud color

From: Joern Wuestenfeld <j.wuestenfeld_at_gsi.de>
Date: Mon, 27 Apr 2009 14:44:33 +0200


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:44:39 CEST

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