Differences between revisions 1 and 11 (spanning 10 versions)
Revision 1 as of 2008-04-09 16:17:02
Size: 1481
Editor: garutti
Comment:
Revision 11 as of 2009-06-16 18:32:14
Size: 212
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
I try here below an outline of the most common settings required:
Line 5: Line 4:
assuming a plot with single pad made in a canvas of
{{{
c1 = new TCanvas("c1","canvas",0,0,600,400);
}}}

the following settings give large enough lables and titles

{{{
  gStyle->SetTextFont(42);
  gStyle->SetCanvasBorderMode(0);
  gStyle->SetCanvasBorderSize(0);
  gStyle->SetCanvasColor(0);
  gStyle->SetLabelFont(42,"xyz");
  gStyle->SetLabelOffset(0.02,"xyz"); // default: 0.005 (percent of pad width)
  gStyle->SetLabelSize(0.06,"xyz"); // default: 0.04 (percent of pad widtth)
  gStyle->SetTitleOffset(1.2,"x");
  gStyle->SetTitleOffset(1.2,"y");
}}}

Some more simple rules for graphs:

{{{
  TGraph *gr = new TGraph(150,x10,y10);
  gr->SetMarkerStyle(20); // use marker types to distinguish different graphs, not colors!!!
  gr->SetMarkerSize(0.7); // set a reasonable size of points
  gr->SetTitle(0); // use no titles (also for histos): the title will be in the caption
  gr->GetXaxis()->SetTitle("X axis title [mm]"); // ALWAYS put lables on the axis
  gr->GetYaxis()->SetTitle("Y axis title [mm]"); // and units in [brakets]
  gr->Draw("AP");
  lable = new TLatex(50,1,"legend"); // write additional text inside the plot as lable
  lable->Draw();
}}}
Please stick to the 'official' [[ROOTlogon|ILD root style]]

For the upcoming pubblications / internal notes / proceedings it would be nice to stick to some common rules for the root plots made by our group.

Please stick to the 'official' ILD root style

HCAL PubblicationRules (last edited 2009-06-16 18:32:14 by localhost)