def subplot(*args, **kwargs):
 if (len(args) == 0):
  args = (1, 1, 1)
 if ((len(args) >= 3) and isinstance(args[2], bool)):
  warnings.warn(u'The subplot index argument to subplot() appears to be a boolean. Did you intend to use subplots()?')
 fig = gcf()
 a = fig.add_subplot(*args, **kwargs)
 bbox = a.bbox
 byebye = []
 for other in fig.axes:
  if (other == a):
   continue
  if bbox.fully_overlaps(other.bbox):
   byebye.append(other)
 for ax in byebye:
  delaxes(ax)
 return a

def subplot ( * args , ** kwargs ) : if ( len ( args ) == 0 ) : args = ( 1 , 1 , 1 ) if ( ( len ( args ) >= 3 ) and isinstance ( args [ 2 ] , bool ) ) : warnings . warn ( u'The subplot index argument to subplot() appears to be a boolean. Did you intend to use subplots()?' ) fig = gcf ( ) a = fig . add_subplot ( * args , ** kwargs ) bbox = a . bbox byebye = [ ] for other in fig . axes : if ( other == a ) : continue if bbox . fully_overlaps ( other . bbox ) : byebye . append ( other ) for ax in byebye : delaxes ( ax ) return a
create a subplot command .