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.SetLogy (
not not op.logy)
173 if isinstance (obj, TH1)
and not isinstance (obj, TH2):
186 if rescale_p
and max
is None:
189 prims = pad.GetListOfPrimitives()
191 prims.ResetBit(TObject.kMustCleanup)
193 if isinstance (obj, TH1):
199 if hfirst
and h.GetMaximum() > hfirst.GetMaximum():
200 hfirst.SetMaximum (h.GetMaximum() * 1.1)
202 if hfirst
and h.GetMinimum() < hfirst.GetMinimum():
203 hfirst.SetMinimum (h.GetMinimum())
207 hh = h.DrawCopy (op.other)
209 hh.SetLineStyle (op.linetype)
211 hh.SetLineStyle ((_samecount%4)+1)
213 hh.SetLineColor (op.color)
214 elif op.linecolors
and _samecount >= 4:
215 hh.SetLineColor (_samecount//4 + 1)
217 hh.SetFillColor (op.fill)