| [ Web Proxy ] |
| Viewing: https://matplotlib.org/stable/api/_as_gen/../_as_gen/../projections_api.html | [Back] [Original] |
Section Navigation
matplotlibmatplotlib.animationmatplotlib.artistmatplotlib.axesmatplotlib.axismatplotlib.backend_basesmatplotlib.backend_managersmatplotlib.backend_toolsmatplotlib.backendsmatplotlib.backends.backend_mixedmatplotlib.backends.backend_templatematplotlib.backends.backend_aggmatplotlib.backends.backend_cairomatplotlib.backends.backend_gtk3agg, matplotlib.backends.backend_gtk3cairomatplotlib.backends.backend_gtk4agg, matplotlib.backends.backend_gtk4cairomatplotlib.backends.backend_nbaggmatplotlib.backends.backend_pdfmatplotlib.backends.backend_pgfmatplotlib.backends.backend_psmatplotlib.backends.registrymatplotlib.backends.backend_qtagg, matplotlib.backends.backend_qtcairomatplotlib.backends.backend_svgmatplotlib.backends.backend_tkagg, matplotlib.backends.backend_tkcairomatplotlib.backends.backend_webagg_corematplotlib.backends.backend_webaggmatplotlib.backends.backend_wxagg, matplotlib.backends.backend_wxcairomatplotlib.beziermatplotlib.categorymatplotlib.cbookmatplotlib.cmmatplotlib.collectionsmatplotlib.colorbarmatplotlib.colorizermatplotlib.colorsmatplotlib.containermatplotlib.contourmatplotlib.datesmatplotlib.dvireadmatplotlib.figurematplotlib.font_managermatplotlib.ft2fontmatplotlib.gridspec
matplotlib.hatchmatplotlib.imagematplotlib.insetmatplotlib.layout_enginematplotlib.legendmatplotlib.legend_handlermatplotlib.lines
matplotlib.markers
matplotlib.mathtextmatplotlib.mlabmatplotlib.offsetboxmatplotlib.patchesmatplotlib.pathmatplotlib.patheffectsmatplotlib.pyplotmatplotlib.projections
matplotlib.quiver
matplotlib.rcsetupmatplotlib.sankeymatplotlib.scalematplotlib.sphinxext.mathmplmatplotlib.sphinxext.plot_directivematplotlib.sphinxext.figmpl_directivematplotlib.sphinxext.rolesmatplotlib.spinesmatplotlib.stylematplotlib.tablematplotlib.testingmatplotlib.textmatplotlib.texmanagermatplotlib.tickermatplotlib.transformsmatplotlib.trimatplotlib.typingmatplotlib.unitsmatplotlib.widgetsmatplotlib._afmmatplotlib._apimatplotlib._docstringmatplotlib._enumsmatplotlib._type1fontmatplotlib._tight_bboxmatplotlib._tight_layoutmpl_toolkits.mplot3dmpl_toolkits.axes_grid1mpl_toolkits.axisartistpylabmatplotlib.projectionsmatplotlib.projections#Non-separable transforms that map from data space to screen space.
Projections are defined as Axes subclasses. They include the
following elements:
A transformation from data coordinates into display coordinates.
An inverse of that transformation. This is used, for example, to convert mouse positions from screen space back into data space.
Transformations for the gridlines, ticks and ticklabels. Custom projections will often need to place these elements in special locations, and Matplotlib has a facility to help with doing so.
Setting up default values (overriding cla), since the defaults
for a rectilinear Axes may not be appropriate.
Defining the shape of the Axes, for example, an elliptical Axes, that will be used to draw the background of the plot and for clipping any data elements.
Defining custom locators and formatters for the projection. For example, in a geographic projection, it may be more convenient to display the grid in degrees, even if the data is in radians.
Set up interactive panning and zooming. This is left as an "advanced"
feature left to the reader, but there is an example of this for polar plots
in matplotlib.projections.polar.
Any additional methods for additional convenience or features.
Once the projection Axes is defined, it can be used in one of two ways:
By defining the class attribute name, the projection Axes can be
registered with matplotlib.projections.register_projection and subsequently
simply invoked by name:
fig.add_subplot(projection="my_proj_name")
For more complex, parameterisable projections, a generic "projection" object
may be defined which includes the method _as_mpl_axes. _as_mpl_axes
should take no arguments and return the projection's Axes subclass and a
dictionary of additional arguments to pass to the subclass' __init__
method. Subsequently a parameterised projection can be initialised with:
fig.add_subplot(projection=MyProjection(param1=param1_value))
where MyProjection is an object which implements a _as_mpl_axes method.
A full-fledged and heavily annotated example is in
Custom projection. The polar plot functionality in
matplotlib.projections.polar may also be of interest.
Bases: object
A mapping of registered projection names to projection classes.
Get a projection class from its name.
If projection is None, a standard rectilinear projection is returned.
Return the names of all projections currently registered.
Matplotlib has built-in support for polar and some geographic projections. See the following pages for more information:
Copyright 20022012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 20122026 The Matplotlib development team.
Created using Sphinx 9.1.0.
Built from v3.11.2-1-g879ad8ebba.
Built with the PyData Sphinx Theme 0.16.1.
| Web Proxy Viewer | New URL | Original Page |