Re: Having an old good white and black plot

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Feb 16 2000 - 17:47:19 MET


Hi Colin,
Root 2.23/12 has 4 built-in styles
  - Default
  - Plain   the one you want
  - Bold
  - Video

You can select one style via
  gROOT->SetStyle("Plain");
for example in your rootlogon.C file if you like.

Note that when you read objects (eg histograms from a file), these
objects
have their graphics attributes set in the original session when they
were
created. You can force their attributes to be changed to the current
style attributes, if you execute;
  gROOT->ForceStyle();
You can add this statement also in your rootlogon.C file if you like.
When the ForceStyle option is active, Root will automatically replace
the objects attributes by the current style when the objects are
imported in memory.

Rene Brun

C. Bernet wrote:
> 
> Hi all,
> 
> I'm currently trying to get a "paw style" with root, that is :
> - No 3d effect
> - Plain white background.
> 
> I already looked in the roottalk, and tried the "save your plot as
> canvas.C and edit it" trick.
> 
> SetFillColor(0) and SetBorderSize(0) works fine for the canvas, but not
> for the TPaveText and TPaveStats (see the macro at the end). Actually,
> you can try anything on them,
> nothing happends...I really don't understand why.
> 
> Does anybody have a clue ?
> 
> Thanks a lot !
> 
>         Colin
> 
> {
> //=========Macro generated from canvas: c1/c1
> //=========  (Wed Feb 16 18:06:59 2000) by ROOT version 2.23/12
>    TCanvas *c1 = new TCanvas("c1", "c1",8,8,698,498);
>    c1->SetHighLightColor(2);
>    c1->Range(-75,-15.75,675,141.75);
>    c1->SetFillColor(0);
>    c1->SetBorderSize(0);
> 
>    h100->Draw("");
> 
>    TPaveText *pt = new TPaveText(0.01,0.945,0.12,0.995,"blNDC");
>    pt->SetBorderSize(0);
>    pt->SetFillColor(19);
>    TText *text = pt->AddText("adc2");
>    pt->Draw();
> 
>    c1->Update();
> 
>    pt = new TPaveStats(0.78,0.82,0.98,0.98,"brNDC");
>    pt->SetBorderSize(2);
>    pt->SetFillColor(19);
>    pt->SetTextAlign(12);
>    text = pt->AddText("h100");
>    text = pt->AddText("Nent = 4811   ");
>    text = pt->AddText("Mean  =    194");
>    text = pt->AddText("RMS   =  47.81");
>    pt->Draw();
>    c1->Update();
>    c1->cd();
> }



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:19 MET