MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / ProjectionRegistry

Class ProjectionRegistry

lib/matplotlib/projections/__init__.py:69–88  ·  view source on GitHub ↗

A mapping of registered projection names to projection classes.

Source from the content-addressed store, hash-verified

67
68
69class ProjectionRegistry:
70 """A mapping of registered projection names to projection classes."""
71
72 def __init__(self):
73 self._all_projection_types = {}
74
75 def register(self, *projections):
76 """Register a new set of projections."""
77 for projection in projections:
78 name = projection.name
79 self._all_projection_types[name] = projection
80
81 def get_projection_class(self, name, _error_cls=KeyError):
82 """Get a projection class from its *name*."""
83 return _api.getitem_checked(self._all_projection_types, _error_cls=_error_cls,
84 projection=name)
85
86 def get_projection_names(self):
87 """Return the names of all projections currently registered."""
88 return sorted(self._all_projection_types)
89
90
91projection_registry = ProjectionRegistry()

Callers 1

__init__.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…