CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
NiceStyle.cc
Go to the documentation of this file.
1 #include <TStyle.h>
2 
3 void setNiceStyle() {
4  TStyle *MyStyle = new TStyle ("MyStyle", "My style for nicer plots");
5 
6  Float_t xoff = MyStyle->GetLabelOffset("X"),
7  yoff = MyStyle->GetLabelOffset("Y"),
8  zoff = MyStyle->GetLabelOffset("Z");
9 
10  MyStyle->SetCanvasBorderMode ( 0 );
11  MyStyle->SetPadBorderMode ( 0 );
12  MyStyle->SetPadColor ( 0 );
13  MyStyle->SetCanvasColor ( 0 );
14  MyStyle->SetTitleColor ( 0 );
15  MyStyle->SetStatColor ( 0 );
16  MyStyle->SetTitleBorderSize ( 0 );
17  MyStyle->SetTitleFillColor ( 0 );
18  MyStyle->SetTitleH ( 0.07 );
19  MyStyle->SetTitleW ( 1.00 );
20  MyStyle->SetTitleFont ( 132 );
21 
22  MyStyle->SetLabelOffset (1.5*xoff, "X");
23  MyStyle->SetLabelOffset (1.5*yoff, "Y");
24  MyStyle->SetLabelOffset (1.5*zoff, "Z");
25 
26  MyStyle->SetTitleOffset (0.9, "X");
27  MyStyle->SetTitleOffset (0.9, "Y");
28  MyStyle->SetTitleOffset (0.9, "Z");
29 
30  MyStyle->SetTitleSize (0.045, "X");
31  MyStyle->SetTitleSize (0.045, "Y");
32  MyStyle->SetTitleSize (0.045, "Z");
33 
34  MyStyle->SetLabelFont (132, "X");
35  MyStyle->SetLabelFont (132, "Y");
36  MyStyle->SetLabelFont (132, "Z");
37 
38  MyStyle->SetPalette(1);
39 
40  MyStyle->cd();
41 }
void setNiceStyle()
Definition: NiceStyle.cc:3