""" Manages the set of projections available to the system. """
""" Register a new set of projections. """
""" Get a projection class from its *name*. """
""" Get a list of the names of all projections currently registered. """
axes.Axes, PolarAxes, AitoffAxes, HammerAxes, LambertAxes, MollweideAxes)
projection_registry.register(cls)
""" Get a projection class from its name.
If *projection* is None, a standard rectilinear projection is returned. """
except KeyError: raise ValueError("Unknown projection %r" % projection)
figure, *args, polar=False, projection=None, **kwargs): """ Handle the args/kwargs to add_axes/add_subplot/gca, returning::
(axes_proj_class, proj_class_kwargs, proj_stack_key)
which can be used for new axes initialization/identification. """ if projection is not None and projection != 'polar': raise ValueError( "polar=True, yet projection=%r. " "Only one of these arguments should be supplied." % projection) projection = 'polar'
elif hasattr(projection, '_as_mpl_axes'): projection_class, extra_kwargs = projection._as_mpl_axes() kwargs.update(**extra_kwargs) else: raise TypeError('projection must be a string, None or implement a ' '_as_mpl_axes method. Got %r' % projection)
# Make the key without projection kwargs, this is used as a unique # lookup for axes instances
""" Get a list of acceptable projection names. """ |