def process_projection_requirements(figure, *args, **kwargs):
 ispolar = kwargs.pop(u'polar', False)
 projection = kwargs.pop(u'projection', None)
 if ispolar:
  if ((projection is not None) and (projection != u'polar')):
   raise ValueError((u'polar=True, yet projection=%r. Only one of these arguments should be supplied.' % projection))
  projection = u'polar'
 if (projection == u'polar'):
  kwargs.setdefault(u'resolution', 1)
 if (isinstance(projection, six.string_types) or (projection is None)):
  projection_class = get_projection_class(projection)
 elif hasattr(projection, u'_as_mpl_axes'):
  (projection_class, extra_kwargs) = projection._as_mpl_axes()
  kwargs.update(**extra_kwargs)
 else:
  raise TypeError((u'projection must be a string, None or implement a _as_mpl_axes method. Got %r' % projection))
 key = figure._make_key(*args, **kwargs)
 return (projection_class, kwargs, key)

def process_projection_requirements ( figure , * args , ** kwargs ) : ispolar = kwargs . pop ( u'polar' , False ) projection = kwargs . pop ( u'projection' , None ) if ispolar : if ( ( projection is not None ) and ( projection != u'polar' ) ) : raise ValueError ( ( u'polar=True, yet projection=%r. Only one of these arguments should be supplied.' % projection ) ) projection = u'polar' if ( projection == u'polar' ) : kwargs . setdefault ( u'resolution' , 1 ) if ( isinstance ( projection , six . string_types ) or ( projection is None ) ) : projection_class = get_projection_class ( projection ) elif hasattr ( projection , u'_as_mpl_axes' ) : ( projection_class , extra_kwargs ) = projection . _as_mpl_axes ( ) kwargs . update ( ** extra_kwargs ) else : raise TypeError ( ( u'projection must be a string, None or implement a _as_mpl_axes method. Got %r' % projection ) ) key = figure . _make_key ( * args , ** kwargs ) return ( projection_class , kwargs , key )
handle the args/kwargs to for add_axes/add_subplot/gca .