RE: default fill color of TLegend

From: Olivier Couet <Olivier.Couet_at_cern.ch>
Date: Mon, 2 Nov 2009 13:14:32 +0100


Hi,
gStyle->SetFillColor() is a very general and global setting which does not really mean anything (FillColor of what ?) ... There is no global settings (gStyle) for the Legend color. You should change it on the legend itself when you create it. O.Couet

-----Original Message-----
From: owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch] On Behalf Of Akira OKUMURA Sent: Monday, November 02, 2009 12:56 PM To: roottalk (Mailing list discussing all aspects of the ROOT system.) Subject: [ROOT] default fill color of TLegend

Hello ROOTers,

Could anyone tell me how to set the default fill color of TLegend? I would like to change it to white.

I tried
gStyle->SetFillColor(0)
, but it causes a side effect when I draw 2D histograms with "col" option.

$ root -n

root [0] gStyle->SetPalette(1)
root [1] gStyle->SetFillColor(0)
root [2] TH2D* h2 = new TH2D("h2", "", 3, -1, 1, 3, -1, 1)
root [3] h2->Fill(0, 0)
root [4] h2->Draw("colz") // <= empty histogram is shown

I'm using v5.24.00 on OS X.

Thank you in advance.

Regards,

OKUMURA, Akira oxon_at_juno.phys.s.u-tokyo.ac.jp Department of Physics, The University of Tokyo 7-3-1 Hongo, Bunkyo-ku, Tokyo 113-0033
TEL/FAX +81 3-5841-4173/4059
Skype : okumura.akira Received on Mon Nov 02 2009 - 13:14:39 CET

This archive was generated by hypermail 2.2.0 : Mon Nov 02 2009 - 17:50:02 CET