def axes(*args, **kwargs):
 nargs = len(args)
 if (len(args) == 0):
  return subplot(111, **kwargs)
 if (nargs > 1):
  raise TypeError(u'Only one non keyword arg to axes allowed')
 arg = args[0]
 if isinstance(arg, Axes):
  a = gcf().sca(arg)
 else:
  rect = arg
  a = gcf().add_axes(rect, **kwargs)
 return a

def axes ( * args , ** kwargs ) : nargs = len ( args ) if ( len ( args ) == 0 ) : return subplot ( 111 , ** kwargs ) if ( nargs > 1 ) : raise TypeError ( u'Only one non keyword arg to axes allowed' ) arg = args [ 0 ] if isinstance ( arg , Axes ) : a = gcf ( ) . sca ( arg ) else : rect = arg a = gcf ( ) . add_axes ( rect , ** kwargs ) return a
add an axes at position rect specified by: - axes() by itself creates a default full subplot window axis .