13from ROOT
import TCanvas, TPad, TFile, TPaveLabel, TPaveText
16c1 =
TCanvas(
'c1',
'Histogram Drawing Options', 200, 10, 700, 900 )
18pad1 =
TPad(
'pad1',
'The pad with the function', 0.03, 0.62, 0.50, 0.92, 21 )
19pad2 =
TPad(
'pad2',
'The pad with the histogram', 0.51, 0.62, 0.98, 0.92, 21 )
20pad3 =
TPad(
'pad3',
'The pad with the histogram', 0.03, 0.02, 0.97, 0.57, 21 )
28example =
TFile(
"py-hsimple.root")
33 'Drawing options for one dimensional histograms' )
34title.SetFillColor( 16 )
35title.SetTextFont( 52 )
41hpx = gROOT.FindObject(
'hpx' )
44label1 =
TPaveLabel( -3.5, 700, -1, 800,
'Default option' )
45label1.SetFillColor( 42 )
51hpx.DrawCopy(
'lego1' )
52label2 =
TPaveLabel( -0.72, 0.74, -0.22, 0.88,
'option Lego1' )
53label2.SetFillColor( 42 )
55label2a =
TPaveLabel( -0.93, -1.08, 0.25, -0.92,
'Click on lego to rotate' )
56label2a.SetFillColor( 42 )
64hpx.SetMarkerStyle( 21 )
66label3 =
TPaveLabel( 2, 600, 3.5, 650,
'option e1p' )
67label3.SetFillColor( 42 )
74pave.SetFillColor( 42 )
75t1 = pave.AddText(
'You can move' )
78pave.AddText(
'Title and Stats pads' )
79pave.AddText(
'X and Y axis' )
80pave.AddText(
'You can modify bin contents' )
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
The most important graphics class in the ROOT system.
A Pave (see TPave) with a text centered in the Pave.