Re: Problem with backgroud color

From: Sebastien Binet <binet_at_cern.ch>
Date: Mon, 27 Apr 2009 14:55:17 +0200


On Monday 27 April 2009 14:49:15 Olivier Couet wrote:
> 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);
> }

couldn't the white background be just the default ? or does the ROOT team have contracts with printers' ink vendors ;)

cheers,
sebastien.

>
> -----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

-- 
#########################################
# Dr. Sebastien Binet
# Laboratoire de l'Accelerateur Lineaire
# Universite Paris-Sud XI
# Batiment 200
# 91898 Orsay
#########################################
Received on Mon Apr 27 2009 - 14:55:35 CEST

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