Skip to content

Instantly share code, notes, and snippets.

@fndari
Created April 30, 2014 08:40
Show Gist options
  • Save fndari/11421345 to your computer and use it in GitHub Desktop.
Save fndari/11421345 to your computer and use it in GitHub Desktop.
Some of the stuff I'm trying to make working with ROOT a marginally less painful experience.
void setCustomStyle()
{
TStyle* customStyle = new TStyle("customStyle", "customStyle");
customStyle->SetDrawBorder(0);
customStyle->SetCanvasBorderMode(0);
customStyle->SetFrameBorderMode(0);
customStyle->SetPadBorderMode(0);
customStyle->SetPalette(1,0); // avoid horrible default color scheme
customStyle->SetOptStat(0);
customStyle->SetOptTitle(0);
customStyle->SetOptDate(0);
customStyle->SetCanvasColor(0);
customStyle->SetLabelSize(0.04, "xyz"); // size of axis value font
customStyle->SetLabelFont(62, "xyz");
customStyle->SetTitleSize(0.055, "xyz"); // size of axis title font
customStyle->SetTitleOffset(0.8, "xyz"); // size of axis title font
customStyle->SetTitleFont(62, "xyz"); // font option
gROOT->SetStyle("customStyle");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment