Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Non string projection definitions #694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 16 commits into from
Closed
Prev Previous commit
Next Next commit
Tidied up branch a little.
  • Loading branch information
Phil Elson committed Feb 6, 2012
commit 53cbea654dbdd2023b69f38e5556e9c5686c80b0
5 changes: 0 additions & 5 deletions doc/devel/add_new_projection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ elements:
"advanced" feature left to the reader, but there is an example of
this for polar plots in :mod:`matplotlib.projections.polar`.

- Optionally define the class attribute ``NAME`` which can be
registered with :func:`matplotlib.projections.register_projection`
and used for simple projection instantiation such as
``plt.axes(projection=NAME)``, where ``NAME`` is a string.

- Any additional methods for additional convenience or features.

Once the projection axes is defined, it can be used in one of two ways:
Expand Down
3 changes: 2 additions & 1 deletion lib/matplotlib/projections/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def get_projection_class(projection=None):
return projection_registry.get_projection_class(projection)
except KeyError:
raise ValueError("Unknown projection '%s'" % projection)




Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't be getting rid of a public function (even if it probably doesn't get used elsewhere) without a deprecation notice and an addendum in the api_changes.

def projection_factory(projection, figure, rect, **kwargs):
"""
Expand Down
11 changes: 0 additions & 11 deletions lib/matplotlib/projections/polar.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,14 +757,3 @@ def drag_pan(self, button, key, x, y):
# return mpath.Path(result, codes)
# transform_path_non_affine = transform_path

class Polar(object):
"""
Represents the polar projection, a Polar instance can be used to initialise
a polar plot in the standard ways, for example::

plt.axes(projection=Polar())

"""
def _as_mpl_axes(self):
# implement the matplotlib axes interface
return PolarAxes, {}