def host_axes(*args, **kwargs):
 import matplotlib.pyplot as plt
 axes_class = kwargs.pop(u'axes_class', None)
 host_axes_class = host_axes_class_factory(axes_class)
 fig = kwargs.get(u'figure', None)
 if (fig is None):
  fig = plt.gcf()
 ax = host_axes_class(fig, *args, **kwargs)
 fig.add_axes(ax)
 plt.draw_if_interactive()
 return ax

def host_axes ( * args , ** kwargs ) : import matplotlib . pyplot as plt axes_class = kwargs . pop ( u'axes_class' , None ) host_axes_class = host_axes_class_factory ( axes_class ) fig = kwargs . get ( u'figure' , None ) if ( fig is None ) : fig = plt . gcf ( ) ax = host_axes_class ( fig , * args , ** kwargs ) fig . add_axes ( ax ) plt . draw_if_interactive ( ) return ax
create axes that can act as a hosts to parasitic axes .