109 def draw_obj (obj, options = "", padnum = -1, pad = None, min=None, max=None):
110 """Draw the root object OBJ in the next available pad.
113 obj - The object to draw.
114 options - Drawing options.
115 These are passed through to the root Draw
116 method, except that we have special
117 handling for the SAME option, and add a new MERGE option.
118 See the header for details.
119 padnum - If this is a non-negative integer, then this specifies
120 the pad in which to draw, overriding
121 other specifications except for PAD. Note: subpad numbers
123 pad - Explicitly specify the pad to use for drawing.
124 Overrides all other specifications.
127 The object that we drew (may not be the same as OBJ if we
137 op = _options (options)
146 if op.same
or op.merge:
168 pad = get_pad (advance_p, padnum)
170 if not op.merge
and not op.same:
171 pad.SetLogx (
not not op.logx)
172 pad.SetLogy (
not not op.logy)
174 if isinstance (obj, TH1)
and not isinstance (obj, TH2):
187 if rescale_p
and max
is None:
190 prims = pad.GetListOfPrimitives()
192 prims.ResetBit(TObject.kMustCleanup)
194 if isinstance (obj, TH1):
200 if hfirst
and h.GetMaximum() > hfirst.GetMaximum():
201 hfirst.SetMaximum (h.GetMaximum() * 1.1)
203 if hfirst
and h.GetMinimum() < hfirst.GetMinimum():
204 hfirst.SetMinimum (h.GetMinimum())
208 hh = h.DrawCopy (op.other)
210 hh.SetLineStyle (op.linetype)
212 hh.SetLineStyle ((_samecount%4)+1)
214 hh.SetLineColor (op.color)
215 elif op.linecolors
and _samecount >= 4:
216 hh.SetLineColor (_samecount//4 + 1)
218 hh.SetFillColor (op.fill)