CMS 3D CMS Logo

NiceStyle.cc File Reference

#include <TStyle.h>

Go to the source code of this file.

Functions

void setNiceStyle ()


Function Documentation

void setNiceStyle (  ) 

Definition at line 3 of file NiceStyle.cc.

Referenced by main().

00003                     {
00004   TStyle *MyStyle = new TStyle ("MyStyle", "My style for nicer plots");
00005   
00006   Float_t xoff = MyStyle->GetLabelOffset("X"),
00007           yoff = MyStyle->GetLabelOffset("Y"),
00008           zoff = MyStyle->GetLabelOffset("Z");
00009 
00010   MyStyle->SetCanvasBorderMode ( 0 );
00011   MyStyle->SetPadBorderMode    ( 0 );
00012   MyStyle->SetPadColor         ( 0 );
00013   MyStyle->SetCanvasColor      ( 0 );
00014   MyStyle->SetTitleColor       ( 0 );
00015   MyStyle->SetStatColor        ( 0 );
00016   MyStyle->SetTitleBorderSize  ( 0 );
00017   MyStyle->SetTitleFillColor   ( 0 );
00018   MyStyle->SetTitleH        ( 0.07 );
00019   MyStyle->SetTitleW        ( 1.00 );
00020   MyStyle->SetTitleFont     (  132 );
00021 
00022   MyStyle->SetLabelOffset (1.5*xoff, "X");
00023   MyStyle->SetLabelOffset (1.5*yoff, "Y");
00024   MyStyle->SetLabelOffset (1.5*zoff, "Z");
00025 
00026   MyStyle->SetTitleOffset (0.9,      "X");
00027   MyStyle->SetTitleOffset (0.9,      "Y");
00028   MyStyle->SetTitleOffset (0.9,      "Z");
00029 
00030   MyStyle->SetTitleSize   (0.045,    "X");
00031   MyStyle->SetTitleSize   (0.045,    "Y");
00032   MyStyle->SetTitleSize   (0.045,    "Z");
00033 
00034   MyStyle->SetLabelFont   (132,      "X");
00035   MyStyle->SetLabelFont   (132,      "Y");
00036   MyStyle->SetLabelFont   (132,      "Z");
00037 
00038   MyStyle->SetPalette(1);
00039 
00040   MyStyle->cd();
00041 }


Generated on Tue Jun 9 17:56:00 2009 for CMSSW by  doxygen 1.5.4