Non-separable transforms that map from data space to screen space.
Projections are defined as Axes
subclasses. They include the following elements:
cla
), since the defaults for a rectilinear axes may not be appropriate.matplotlib.projections.polar
.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.
Return the names of all projections currently registered.
Register a new set of projections.
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.projections.polar
Bases: matplotlib.transforms.Transform
The inverse of the polar transform, mapping Cartesian coordinate space x and y back to theta and r.
A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform)
when DEBUG=True.
True if this transform has a corresponding inverse transform.
The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
Return the corresponding inverse transformation.
It holds x == self.inverted().transform(self.transform(x))
.
The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
Apply only the non-affine part of this transformation.
transform(values)
is always equivalent to transform_affine(transform_non_affine(values))
.
In non-affine transformations, this is generally equivalent to transform(values)
. In affine transformations, this is always a no-op.
The input values as NumPy array of length input_dims
or shape (N x input_dims
).
The output values as NumPy array of length input_dims
or shape (N x output_dims
), depending on the input.
Bases: matplotlib.transforms.Affine2DBase
The affine part of the polar projection. Scales the output so that maximum radius rests on the edge of the axes circle.
limits is the view limit of the data. The only part of its bounds that is used is the y limits (for the radius limits). The theta range is handled by the non-affine transform.
Get the matrix for the affine part of this transform.
Bases: matplotlib.axes._axes.Axes
A polar graph projection, where the input dimensions are theta, r.
Theta starts pointing east and goes anti-clockwise.
Build an Axes in a figure.
Figure
The Axes is built in the Figure
fig.
The Axes is built in the rectangle rect. rect is in Figure
coordinates.
Axes
, optional
The x or y axis
is shared with the x or y axis in the input Axes
.
Whether the Axes frame is visible.
Set a fixed aspect for the Axes box, i.e. the ratio of height to width. See set_box_aspect
for details.
Other optional keyword arguments:
Property | Description |
---|---|
{'box', 'datalim'} | |
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
scalar or None | |
(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...} | |
bool | |
{'auto', 'equal'} or float | |
bool | |
bool | |
bool | |
Callable[[Axes, Renderer], Bbox] | |
bool or 'line' | |
float or None | |
bool | |
Patch or (Path, Transform) or None | |
| color |
bool | |
str | |
bool | |
object | |
bool | |
unknown | |
None or bool or float or callable | |
[left, bottom, width, height] or | |
unknown | |
float or None | |
bool | |
(scale: float, length: float, randomness: float) | |
bool or None | |
str | |
str | |
bool | |
unknown | |
str | |
(bottom: float, top: float) | |
float greater than -0.5 | |
{"linear", "log", "symlog", "logit", ...} or | |
unknown | |
unknown | |
unknown | |
str | |
(bottom: float, top: float) | |
float greater than -0.5 | |
{"linear", "log", "symlog", "logit", ...} or | |
unknown | |
unknown | |
float |
Bases: matplotlib.transforms.Transform
The inverse of the polar transform, mapping Cartesian coordinate space x and y back to theta and r.
A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform)
when DEBUG=True.
True if this transform has a corresponding inverse transform.
The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
Return the corresponding inverse transformation.
It holds x == self.inverted().transform(self.transform(x))
.
The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
Apply only the non-affine part of this transformation.
transform(values)
is always equivalent to transform_affine(transform_non_affine(values))
.
In non-affine transformations, this is generally equivalent to transform(values)
. In affine transformations, this is always a no-op.
The input values as NumPy array of length input_dims
or shape (N x input_dims
).
The output values as NumPy array of length input_dims
or shape (N x output_dims
), depending on the input.
Bases: matplotlib.transforms.Affine2DBase
The affine part of the polar projection. Scales the output so that maximum radius rests on the edge of the axes circle.
limits is the view limit of the data. The only part of its bounds that is used is the y limits (for the radius limits). The theta range is handled by the non-affine transform.
Get the matrix for the affine part of this transform.
Bases: matplotlib.transforms.Transform
The base polar transform. This handles projection theta and r into Cartesian coordinate space x and y, but does not perform the ultimate affine transformation into the correct position.
A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform)
when DEBUG=True.
True if this transform has a corresponding inverse transform.
The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
Return the corresponding inverse transformation.
It holds x == self.inverted().transform(self.transform(x))
.
The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
Apply only the non-affine part of this transformation.
transform(values)
is always equivalent to transform_affine(transform_non_affine(values))
.
In non-affine transformations, this is generally equivalent to transform(values)
. In affine transformations, this is always a no-op.
The input values as NumPy array of length input_dims
or shape (N x input_dims
).
The output values as NumPy array of length input_dims
or shape (N x output_dims
), depending on the input.
Bases: matplotlib.ticker.Locator
Used to locate radius ticks.
Ensures that all ticks are strictly positive. For all other tasks, it delegates to the base Locator
(which may be different depending on the scale of the r-axis).
Adjust a range as needed to avoid singularities.
This method gets called during autoscaling, with (v0, v1)
set to the data limits on the axes if the axes contains any data, or (-inf, +inf)
if not.
v0 == v1
(possibly up to some floating point slop), this method returns an expanded interval around this value.(v0, v1) == (-inf, +inf)
, this method returns appropriate default view limits.(v0, v1)
is returned without modification.Select a scale for the range from vmin to vmax.
Subclasses should override this method to change locator behaviour.
Bases: matplotlib.ticker.Formatter
Used to format the theta tick labels. Converts the native unit of radians into degrees and adds a degree symbol.
Bases: matplotlib.ticker.Locator
Used to locate theta ticks.
This will work the same as the base locator except in the case that the view spans the entire circle. In such cases, the previously used default locations of every 45 degrees are returned.
Select a scale for the range from vmin to vmax.
Subclasses should override this method to change locator behaviour.
Return whether this axes supports the pan/zoom button functionality.
For polar axes, this is slightly misleading. Both panning and zooming are performed by the same button. Panning is performed in azimuth while zooming is done along the radial.
Return whether this axes supports the zoom box button functionality.
Polar axes do not support zoom boxes.
Clear the Axes.
Called when the mouse moves during a pan operation.
MouseButton
The pressed mouse button.
The pressed key, if any.
The mouse coordinates in display coords.
This is intended to be overridden by new projection types.
Draw the Artist (and its children) using the given renderer.
This has no effect if the artist is not visible (Artist.get_visible
returns False).
RendererBase
subclass.
This method is overridden in the Artist subclasses.
Called when a pan operation completes (when the mouse button is up.)
This is intended to be overridden by new projection types.
Return a format string formatting the x, y coordinates.
Return the aspect ratio of the data itself. For a polar plot, this should always be 1.0
The theta position of the radius labels in degrees.
Outer radial limit.
The inner radial limit.
Get the direction in which theta increases.
Theta increases in the clockwise direction
Theta increases in the counterclockwise direction
Get the offset for the location of 0 in radians.
Return the maximum theta limit in degrees.
Get the minimum theta limit in degrees.
The transform used for drawing x-axis labels, which will add pad_points of padding (in points) between the axis and the label. The x-direction is in data coordinates and the y-direction is in axis coordinates
The text vertical alignment.
The text horizontal alignment.
This transformation is primarily used by the Axis
class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations.
The transform used for drawing secondary x-axis labels, which will add pad_points of padding (in points) between the axis and the label. The x-direction is in data coordinates and the y-direction is in axis coordinates
The text vertical alignment.
The text horizontal alignment.
This transformation is primarily used by the Axis
class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations.
Get the transformation used for drawing x-axis labels, ticks and gridlines. The x-direction is in data coordinates and the y-direction is in axis coordinates.
Note
This transformation is primarily used by the Axis
class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations.
The transform used for drawing y-axis labels, which will add pad_points of padding (in points) between the axis and the label. The x-direction is in axis coordinates and the y-direction is in data coordinates
The text vertical alignment.
The text horizontal alignment.
This transformation is primarily used by the Axis
class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations.
The transform used for drawing secondart y-axis labels, which will add pad_points of padding (in points) between the axis and the label. The x-direction is in axis coordinates and the y-direction is in data coordinates
The text vertical alignment.
The text horizontal alignment.
This transformation is primarily used by the Axis
class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations.
Get the transformation used for drawing y-axis labels, ticks and gridlines. The x-direction is in axis coordinates and the y-direction is in data coordinates.
Note
This transformation is primarily used by the Axis
class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations.
Set multiple properties at once.
Supported properties are
Property | Description |
---|---|
{'box', 'datalim'} | |
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
scalar or None | |
(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...} | |
bool | |
{'auto', 'equal'} or float | |
bool | |
bool | |
bool | |
Callable[[Axes, Renderer], Bbox] | |
bool or 'line' | |
float or None | |
bool | |
Patch or (Path, Transform) or None | |
| color |
bool | |
str | |
bool | |
object | |
bool | |
unknown | |
None or bool or float or callable | |
[left, bottom, width, height] or | |
unknown | |
float or None | |
bool | |
tuple with floats | |
number | |
unknown | |
float | |
float | |
float | |
unknown | |
unknown | |
(scale: float, length: float, randomness: float) | |
bool or None | |
unknown | |
unknown | |
str | |
tuple with floats, degrees | |
unknown | |
unknown | |
unknown | |
str | |
str | |
bool | |
unknown | |
str | |
(bottom: float, top: float) | |
float greater than -0.5 | |
{"linear", "log", "symlog", "logit", ...} or | |
unknown | |
unknown | |
unknown | |
str | |
float, optional | |
float greater than -0.5 | |
unknown | |
unknown | |
unknown | |
float |
Set the radial gridlines on a polar plot.
The radii for the radial gridlines
The labels to use at each radial gridline. The matplotlib.ticker.ScalarFormatter
will be used if None.
The angular position of the radius labels in degrees.
Format string used in matplotlib.ticker.FormatStrFormatter
. For example '%f'.
lines.Line2D
The radial gridlines.
text.Text
The tick labels.
kwargs are optional Text
properties for the labels.
Update the theta position of the radius labels.
The angular position of the radius labels in degrees.
Set the outer radial limit.
Set the inner radial limit.
Update the radial origin.
Set the direction in which theta increases.
Theta increases in the clockwise direction
Theta increases in the counterclockwise direction
Set the offset for the location of 0 in radians.
Set the location of theta's zero.
This simply calls set_theta_offset
with the correct value in radians.
May be one of "N", "NW", "W", "SW", "S", "SE", "E", or "NE".
An offset in degrees to apply from the specified loc. Note: this offset is always applied counter-clockwise regardless of the direction setting.
Set the theta gridlines in a polar plot.
The angles of the theta gridlines.
The labels to use at each theta gridline. The projections.polar.ThetaFormatter
will be used if None.
Format string used in matplotlib.ticker.FormatStrFormatter
. For example '%f'. Note that the angle that is used is in radians.
lines.Line2D
The theta gridlines.
text.Text
The tick labels.
kwargs are optional Text
properties for the labels.
Set the minimum and maximum theta values.
Can take the following signatures:
set_thetalim(minval, maxval)
: Set the limits in radians.set_thetalim(thetamin=minval, thetamax=maxval)
: Set the limits in degrees.where minval and maxval are the minimum and maximum limits. Values are wrapped in to the range \([0, 2\pi]\) (in radians), so for example it is possible to do set_thetalim(-np.pi / 2, np.pi / 2)
to have an axes symmetric around 0. A ValueError is raised if the absolute angle difference is larger than a full circle.
Set the maximum theta limit in degrees.
Set the minimum theta limit in degrees.
Set the data limits for the radial axis.
The bottom limit (default: None, which leaves the bottom limit unchanged). The bottom and top ylims may be passed as the tuple (bottom, top) as the first positional argument (or as the bottom keyword argument).
The top limit (default: None, which leaves the top limit unchanged).
Whether to notify observers of limit change.
Whether to turn on autoscaling of the y-axis. True turns on, False turns off, None leaves unchanged.
These arguments are deprecated and will be removed in a future version. They are equivalent to bottom and top respectively, and it is an error to pass both ymin and bottom or ymax and top.
The new y-axis limits in data coordinates.
Set the y-axis scale.
ScaleBase
The axis scale type to apply.
Different keyword arguments are accepted, depending on the scale. See the respective class keyword arguments:
By default, Matplotlib supports the above mentioned scales. Additionally, custom scales may be registered using matplotlib.scale.register_scale
. These scales can then also be used here.
Called when a pan operation has started.
The mouse coordinates in display coords.
MouseButton
The pressed mouse button.
This is intended to be overridden by new projection types.
Bases: matplotlib.transforms.Transform
The base polar transform. This handles projection theta and r into Cartesian coordinate space x and y, but does not perform the ultimate affine transformation into the correct position.
A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform)
when DEBUG=True.
True if this transform has a corresponding inverse transform.
The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
Return the corresponding inverse transformation.
It holds x == self.inverted().transform(self.transform(x))
.
The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
Apply only the non-affine part of this transformation.
transform(values)
is always equivalent to transform_affine(transform_non_affine(values))
.
In non-affine transformations, this is generally equivalent to transform(values)
. In affine transformations, this is always a no-op.
The input values as NumPy array of length input_dims
or shape (N x input_dims
).
The output values as NumPy array of length input_dims
or shape (N x output_dims
), depending on the input.
Bases: matplotlib.axis.YAxis
A radial Axis.
This overrides certain properties of a YAxis
to provide special-casing for a radial axis.
matplotlib.axes.Axes
The Axes
to which the created Axis belongs.
The acceptance radius for containment tests. See also Axis.contains
.
Read-only name identifying the axis.
[Deprecated]
Deprecated since version 3.4:
Clear the axis.
This resets axis properties to their default values:
Set multiple properties at once.
Supported properties are
Property | Description |
---|---|
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
scalar or None | |
bool | |
bool | |
Patch or (Path, Transform) or None | |
unknown | |
str | |
bool | |
unknown | |
object | |
unknown | |
{'left', 'right'} | |
str | |
| |
| |
{'left', 'right'} | |
None or bool or float or callable | |
float | |
bool | |
unknown | |
(scale: float, length: float, randomness: float) | |
bool or None | |
unknown | |
sequence of str or of | |
list of floats | |
{'left', 'right', 'both', 'default', 'none'} | |
units tag | |
str | |
unknown | |
bool | |
float |
Bases: matplotlib.ticker.Locator
Used to locate radius ticks.
Ensures that all ticks are strictly positive. For all other tasks, it delegates to the base Locator
(which may be different depending on the scale of the r-axis).
Adjust a range as needed to avoid singularities.
This method gets called during autoscaling, with (v0, v1)
set to the data limits on the axes if the axes contains any data, or (-inf, +inf)
if not.
v0 == v1
(possibly up to some floating point slop), this method returns an expanded interval around this value.(v0, v1) == (-inf, +inf)
, this method returns appropriate default view limits.(v0, v1)
is returned without modification.Select a scale for the range from vmin to vmax.
Subclasses should override this method to change locator behaviour.
Bases: matplotlib.axis.YTick
A radial-axis tick.
This subclass of YTick
provides radial ticks with some small modification to their re-positioning such that ticks are rotated based on axes limits. This results in ticks that are correctly perpendicular to the spine. Labels are also rotated to be perpendicular to the spine, when 'auto' rotation is enabled.
bbox is the Bound2D bounding box in display coords of the Axes loc is the tick location in data coords size is the tick size in points
Set multiple properties at once.
Supported properties are
Property | Description |
---|---|
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
scalar or None | |
bool | |
bool | |
Patch or (Path, Transform) or None | |
str | |
bool | |
str | |
str | |
str | |
float | |
None or bool or float or callable | |
bool | |
(scale: float, length: float, randomness: float) | |
bool or None | |
str | |
bool | |
float |
Set the location of tick in data coords with scalar loc.
Bases: matplotlib.axis.XAxis
A theta Axis.
This overrides certain properties of an XAxis
to provide special-casing for an angular axis.
matplotlib.axes.Axes
The Axes
to which the created Axis belongs.
The acceptance radius for containment tests. See also Axis.contains
.
Read-only name identifying the axis.
[Deprecated]
Deprecated since version 3.4:
Clear the axis.
This resets axis properties to their default values:
Set multiple properties at once.
Supported properties are
Property | Description |
---|---|
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
scalar or None | |
bool | |
bool | |
Patch or (Path, Transform) or None | |
unknown | |
str | |
bool | |
unknown | |
object | |
unknown | |
{'top', 'bottom'} | |
str | |
| |
| |
None or bool or float or callable | |
float | |
bool | |
unknown | |
(scale: float, length: float, randomness: float) | |
bool or None | |
unknown | |
sequence of str or of | |
list of floats | |
{'top', 'bottom', 'both', 'default', 'none'} | |
units tag | |
str | |
unknown | |
bool | |
float |
Bases: matplotlib.ticker.Formatter
Used to format the theta tick labels. Converts the native unit of radians into degrees and adds a degree symbol.
Bases: matplotlib.ticker.Locator
Used to locate theta ticks.
This will work the same as the base locator except in the case that the view spans the entire circle. In such cases, the previously used default locations of every 45 degrees are returned.
Select a scale for the range from vmin to vmax.
Subclasses should override this method to change locator behaviour.
Bases: matplotlib.axis.XTick
A theta-axis tick.
This subclass of XTick
provides angular ticks with some small modification to their re-positioning such that ticks are rotated based on tick location. This results in ticks that are correctly perpendicular to the arc spine.
When 'auto' rotation is enabled, labels are also rotated to be parallel to the spine. The label padding is also applied here since it's not possible to use a generic axes transform to produce tick-specific padding.
bbox is the Bound2D bounding box in display coords of the Axes loc is the tick location in data coords size is the tick size in points
Set multiple properties at once.
Supported properties are
Property | Description |
---|---|
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
scalar or None | |
bool | |
bool | |
Patch or (Path, Transform) or None | |
str | |
bool | |
str | |
str | |
str | |
float | |
None or bool or float or callable | |
bool | |
(scale: float, length: float, randomness: float) | |
bool or None | |
str | |
bool | |
float |
Set the location of tick in data coords with scalar loc.
matplotlib.projections.geo
Bases: matplotlib.projections.geo.GeoAxes
Build an Axes in a figure.
Figure
The Axes is built in the Figure
fig.
The Axes is built in the rectangle rect. rect is in Figure
coordinates.
Axes
, optional
The x or y axis
is shared with the x or y axis in the input Axes
.
Whether the Axes frame is visible.
Set a fixed aspect for the Axes box, i.e. the ratio of height to width. See set_box_aspect
for details.
Other optional keyword arguments:
Property | Description |
---|---|
{'box', 'datalim'} | |
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
scalar or None | |
(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...} | |
bool | |
{'auto', 'equal'} or float | |
bool | |
bool | |
bool | |
Callable[[Axes, Renderer], Bbox] | |
bool or 'line' | |
float or None | |
bool | |
Patch or (Path, Transform) or None | |
| color |
bool | |
str | |
bool | |
object | |
bool | |
unknown | |
None or bool or float or callable | |
[left, bottom, width, height] or | |
unknown | |
float or None | |
bool | |
(scale: float, length: float, randomness: float) | |
bool or None | |
str | |
str | |
bool | |
unknown | |
str | |
(bottom: float, top: float) | |
float greater than -0.5 | |
{"linear", "log", "symlog", "logit", ...} or | |
unknown | |
unknown | |
unknown | |
str | |
(bottom: float, top: float) | |
float greater than -0.5 | |
{"linear", "log", "symlog", "logit", ...} or | |
unknown | |
unknown | |
float |
Bases: matplotlib.projections.geo._GeoTransform
The base Aitoff transform.
Create a new geographical transform.
Resolution is the number of steps to interpolate between each input line segment to approximate its path in curved space.
True if this transform has a corresponding inverse transform.
Return the corresponding inverse transformation.
It holds x == self.inverted().transform(self.transform(x))
.
The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
Apply only the non-affine part of this transformation.
transform(values)
is always equivalent to transform_affine(transform_non_affine(values))
.
In non-affine transformations, this is generally equivalent to transform(values)
. In affine transformations, this is always a no-op.
The input values as NumPy array of length input_dims
or shape (N x input_dims
).
The output values as NumPy array of length input_dims
or shape (N x output_dims
), depending on the input.
Bases: matplotlib.projections.geo._GeoTransform
Create a new geographical transform.
Resolution is the number of steps to interpolate between each input line segment to approximate its path in curved space.
True if this transform has a corresponding inverse transform.
Return the corresponding inverse transformation.
It holds x == self.inverted().transform(self.transform(x))
.
The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
Apply only the non-affine part of this transformation.
transform(values)
is always equivalent to transform_affine(transform_non_affine(values))
.
In non-affine transformations, this is generally equivalent to transform(values)
. In affine transformations, this is always a no-op.
The input values as NumPy array of length input_dims
or shape (N x input_dims
).
The output values as NumPy array of length input_dims
or shape (N x output_dims
), depending on the input.
Set multiple properties at once.
Supported properties are
Property | Description |
---|---|
{'box', 'datalim'} | |
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
scalar or None | |
(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...} | |
bool | |
{'auto', 'equal'} or float | |
bool | |
bool | |
bool | |
Callable[[Axes, Renderer], Bbox] | |
bool or 'line' | |
float or None | |
bool | |
Patch or (Path, Transform) or None | |
| color |
bool | |
str | |
bool | |
object | |
unknown | |
unknown | |
unknown | |
bool | |
unknown | |
None or bool or float or callable | |
[left, bottom, width, height] or | |
unknown | |
float or None | |
bool | |
(scale: float, length: float, randomness: float) | |
bool or None | |
str | |
str | |
bool | |
unknown | |
str | |
unknown | |
float greater than -0.5 | |
unknown | |
unknown | |
unknown | |
unknown | |
str | |
unknown | |
float greater than -0.5 | |
unknown | |
unknown | |
unknown | |
float |
Bases: matplotlib.axes._axes.Axes
An abstract base class for geographic projections.
Build an Axes in a figure.
Figure
The Axes is built in the Figure
fig.
The Axes is built in the rectangle rect. rect is in Figure
coordinates.
Axes
, optional
The x or y axis
is shared with the x or y axis in the input Axes
.
Whether the Axes frame is visible.
Set a fixed aspect for the Axes box, i.e. the ratio of height to width. See set_box_aspect
for details.
Other optional keyword arguments:
Property | Description |
---|---|
{'box', 'datalim'} | |
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
scalar or None | |
(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...} | |
bool | |
{'auto', 'equal'} or float | |
bool | |
bool | |
bool | |
Callable[[Axes, Renderer], Bbox] | |
bool or 'line' | |
float or None | |
bool | |
Patch or (Path, Transform) or None | |
| color |
bool | |
str | |
bool | |
object | |
bool | |
unknown | |
None or bool or float or callable | |
[left, bottom, width, height] or | |
unknown | |
float or None | |
bool | |
(scale: float, length: float, randomness: float) | |
bool or None | |
str | |
str | |
bool | |
unknown | |
str | |
(bottom: float, top: float) | |
float greater than -0.5 | |
{"linear", "log", "symlog", "logit", ...} or | |
unknown | |
unknown | |
unknown | |
str | |
(bottom: float, top: float) | |
float greater than -0.5 | |
{"linear", "log", "symlog", "logit", ...} or | |
unknown | |
unknown | |
float |
Bases: matplotlib.ticker.Formatter
Used to format the theta tick labels. Converts the native unit of radians into degrees and adds a degree symbol.
Return whether this axes supports the pan/zoom button functionality.
This axes object does not support interactive pan/zoom.
Return whether this axes supports the zoom box button functionality.
This axes object does not support interactive zoom box.
Clear the Axes.
Called when the mouse moves during a pan operation.
MouseButton
The pressed mouse button.
The pressed key, if any.
The mouse coordinates in display coords.
This is intended to be overridden by new projection types.
Called when a pan operation completes (when the mouse button is up.)
This is intended to be overridden by new projection types.
Return a format string formatting the coordinate.
Return the aspect ratio of the data itself.
The transform used for drawing x-axis labels, which will add pad_points of padding (in points) between the axis and the label. The x-direction is in data coordinates and the y-direction is in axis coordinates
The text vertical alignment.
The text horizontal alignment.
This transformation is primarily used by the Axis
class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations.
The transform used for drawing secondary x-axis labels, which will add pad_points of padding (in points) between the axis and the label. The x-direction is in data coordinates and the y-direction is in axis coordinates
The text vertical alignment.
The text horizontal alignment.
This transformation is primarily used by the Axis
class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations.
Get the transformation used for drawing x-axis labels, ticks and gridlines. The x-direction is in data coordinates and the y-direction is in axis coordinates.
Note
This transformation is primarily used by the Axis
class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations.
The transform used for drawing y-axis labels, which will add pad_points of padding (in points) between the axis and the label. The x-direction is in axis coordinates and the y-direction is in data coordinates
The text vertical alignment.
The text horizontal alignment.
This transformation is primarily used by the Axis
class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations.
The transform used for drawing secondart y-axis labels, which will add pad_points of padding (in points) between the axis and the label. The x-direction is in axis coordinates and the y-direction is in data coordinates
The text vertical alignment.
The text horizontal alignment.
This transformation is primarily used by the Axis
class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations.
Get the transformation used for drawing y-axis labels, ticks and gridlines. The x-direction is in axis coordinates and the y-direction is in data coordinates.
Note
This transformation is primarily used by the Axis
class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations.
Set multiple properties at once.
Supported properties are
Property | Description |
---|---|
{'box', 'datalim'} | |
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
scalar or None | |
(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...} | |
bool | |
{'auto', 'equal'} or float | |
bool | |
bool | |
bool | |
Callable[[Axes, Renderer], Bbox] | |
bool or 'line' | |
float or None | |
bool | |
Patch or (Path, Transform) or None | |
| color |
bool | |
str | |
bool | |
object | |
unknown | |
unknown | |
unknown | |
bool | |
unknown | |
None or bool or float or callable | |
[left, bottom, width, height] or | |
unknown | |
float or None | |
bool | |
(scale: float, length: float, randomness: float) | |
bool or None | |
str | |
str | |
bool | |
unknown | |
str | |
unknown | |
float greater than -0.5 | |
unknown | |
unknown | |
unknown | |
unknown | |
str | |
unknown | |
float greater than -0.5 | |
unknown | |
unknown | |
unknown | |
float |
Set the number of degrees between each latitude grid.
Set the number of degrees between each longitude grid.
Set the latitude(s) at which to stop drawing the longitude grids.
Not supported. Please consider using Cartopy.
Set the x-axis scale.
ScaleBase
The axis scale type to apply.
Different keyword arguments are accepted, depending on the scale. See the respective class keyword arguments:
By default, Matplotlib supports the above mentioned scales. Additionally, custom scales may be registered using matplotlib.scale.register_scale
. These scales can then also be used here.
Not supported. Please consider using Cartopy.
Set the y-axis scale.
ScaleBase
The axis scale type to apply.
Different keyword arguments are accepted, depending on the scale. See the respective class keyword arguments:
By default, Matplotlib supports the above mentioned scales. Additionally, custom scales may be registered using matplotlib.scale.register_scale
. These scales can then also be used here.
Called when a pan operation has started.
The mouse coordinates in display coords.
MouseButton
The pressed mouse button.
This is intended to be overridden by new projection types.
Bases: matplotlib.projections.geo.GeoAxes
Build an Axes in a figure.
Figure
The Axes is built in the Figure
fig.
The Axes is built in the rectangle rect. rect is in Figure
coordinates.
Axes
, optional
The x or y axis
is shared with the x or y axis in the input Axes
.
Whether the Axes frame is visible.
Set a fixed aspect for the Axes box, i.e. the ratio of height to width. See set_box_aspect
for details.
Other optional keyword arguments:
Property | Description |
---|---|
{'box', 'datalim'} | |
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
scalar or None | |
(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...} | |
bool | |
{'auto', 'equal'} or float | |
bool | |
bool | |
bool | |
Callable[[Axes, Renderer], Bbox] | |
bool or 'line' | |
float or None | |
bool | |
Patch or (Path, Transform) or None | |
| color |
bool | |
str | |
bool | |
object | |
bool | |
unknown | |
None or bool or float or callable | |
[left, bottom, width, height] or | |
unknown | |
float or None | |
bool | |
(scale: float, length: float, randomness: float) | |
bool or None | |
str | |
str | |
bool | |
unknown | |
str | |
(bottom: float, top: float) | |
float greater than -0.5 | |
{"linear", "log", "symlog", "logit", ...} or | |
unknown | |
unknown | |
unknown | |
str | |
(bottom: float, top: float) | |
float greater than -0.5 | |
{"linear", "log", "symlog", "logit", ...} or | |
unknown | |
unknown | |
float |
Bases: matplotlib.projections.geo._GeoTransform
The base Hammer transform.
Create a new geographical transform.
Resolution is the number of steps to interpolate between each input line segment to approximate its path in curved space.
True if this transform has a corresponding inverse transform.
Return the corresponding inverse transformation.
It holds x == self.inverted().transform(self.transform(x))
.
The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
Apply only the non-affine part of this transformation.
transform(values)
is always equivalent to transform_affine(transform_non_affine(values))
.
In non-affine transformations, this is generally equivalent to transform(values)
. In affine transformations, this is always a no-op.
The input values as NumPy array of length input_dims
or shape (N x input_dims
).
The output values as NumPy array of length input_dims
or shape (N x output_dims
), depending on the input.
Bases: matplotlib.projections.geo._GeoTransform
Create a new geographical transform.
Resolution is the number of steps to interpolate between each input line segment to approximate its path in curved space.
True if this transform has a corresponding inverse transform.
Return the corresponding inverse transformation.
It holds x == self.inverted().transform(self.transform(x))
.
The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
Apply only the non-affine part of this transformation.
transform(values)
is always equivalent to transform_affine(transform_non_affine(values))
.
In non-affine transformations, this is generally equivalent to transform(values)
. In affine transformations, this is always a no-op.
The input values as NumPy array of length input_dims
or shape (N x input_dims
).
The output values as NumPy array of length input_dims
or shape (N x output_dims
), depending on the input.
Set multiple properties at once.
Supported properties are
Property | Description |
---|---|
{'box', 'datalim'} | |
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
scalar or None | |
(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...} | |
bool | |
{'auto', 'equal'} or float | |
bool | |
bool | |
bool | |
Callable[[Axes, Renderer], Bbox] | |
bool or 'line' | |
float or None | |
bool | |
Patch or (Path, Transform) or None | |
| color |
bool | |
str | |
bool | |
object | |
unknown | |
unknown | |
unknown | |
bool | |
unknown | |
None or bool or float or callable | |
[left, bottom, width, height] or | |
unknown | |
float or None | |
bool | |
(scale: float, length: float, randomness: float) | |
bool or None | |
str | |
str | |
bool | |
unknown | |
str | |
unknown | |
float greater than -0.5 | |
unknown | |
unknown | |
unknown | |
unknown | |
str | |
unknown | |
float greater than -0.5 | |
unknown | |
unknown | |
unknown | |
float |
Bases: matplotlib.projections.geo.GeoAxes
Build an Axes in a figure.
Figure
The Axes is built in the Figure
fig.
The Axes is built in the rectangle rect. rect is in Figure
coordinates.
Axes
, optional
The x or y axis
is shared with the x or y axis in the input Axes
.
Whether the Axes frame is visible.
Set a fixed aspect for the Axes box, i.e. the ratio of height to width. See set_box_aspect
for details.
Other optional keyword arguments:
Property | Description |
---|---|
{'box', 'datalim'} | |
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
scalar or None | |
(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...} | |
bool | |
{'auto', 'equal'} or float | |
bool | |
bool | |
bool | |
Callable[[Axes, Renderer], Bbox] | |
bool or 'line' | |
float or None | |
bool | |
Patch or (Path, Transform) or None | |
| color |
bool | |
str | |
bool | |
object | |
bool | |
unknown | |
None or bool or float or callable | |
[left, bottom, width, height] or | |
unknown | |
float or None | |
bool | |
(scale: float, length: float, randomness: float) | |
bool or None | |
str | |
str | |
bool | |
unknown | |
str | |
(bottom: float, top: float) | |
float greater than -0.5 | |
{"linear", "log", "symlog", "logit", ...} or | |
unknown | |
unknown | |
unknown | |
str | |
(bottom: float, top: float) | |
float greater than -0.5 | |
{"linear", "log", "symlog", "logit", ...} or | |
unknown | |
unknown | |
float |
Bases: matplotlib.projections.geo._GeoTransform
Create a new geographical transform.
Resolution is the number of steps to interpolate between each input line segment to approximate its path in curved space.
True if this transform has a corresponding inverse transform.
Return the corresponding inverse transformation.
It holds x == self.inverted().transform(self.transform(x))
.
The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
Apply only the non-affine part of this transformation.
transform(values)
is always equivalent to transform_affine(transform_non_affine(values))
.
In non-affine transformations, this is generally equivalent to transform(values)
. In affine transformations, this is always a no-op.
The input values as NumPy array of length input_dims
or shape (N x input_dims
).
The output values as NumPy array of length input_dims
or shape (N x output_dims
), depending on the input.
Bases: matplotlib.projections.geo._GeoTransform
The base Lambert transform.
Create a new Lambert transform. Resolution is the number of steps to interpolate between each input line segment to approximate its path in curved Lambert space.
True if this transform has a corresponding inverse transform.
Return the corresponding inverse transformation.
It holds x == self.inverted().transform(self.transform(x))
.
The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
Apply only the non-affine part of this transformation.
transform(values)
is always equivalent to transform_affine(transform_non_affine(values))
.
In non-affine transformations, this is generally equivalent to transform(values)
. In affine transformations, this is always a no-op.
The input values as NumPy array of length input_dims
or shape (N x input_dims
).
The output values as NumPy array of length input_dims
or shape (N x output_dims
), depending on the input.
Clear the Axes.
Set multiple properties at once.
Supported properties are
Property | Description |
---|---|
{'box', 'datalim'} | |
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
scalar or None | |
(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...} | |
bool | |
{'auto', 'equal'} or float | |
bool | |
bool | |
bool | |
Callable[[Axes, Renderer], Bbox] | |
bool or 'line' | |
float or None | |
bool | |
Patch or (Path, Transform) or None | |
| color |
bool | |
str | |
bool | |
object | |
unknown | |
unknown | |
unknown | |
bool | |
unknown | |
None or bool or float or callable | |
[left, bottom, width, height] or | |
unknown | |
float or None | |
bool | |
(scale: float, length: float, randomness: float) | |
bool or None | |
str | |
str | |
bool | |
unknown | |
str | |
unknown | |
float greater than -0.5 | |
unknown | |
unknown | |
unknown | |
unknown | |
str | |
unknown | |
float greater than -0.5 | |
unknown | |
unknown | |
unknown | |
float |
Bases: matplotlib.projections.geo.GeoAxes
Build an Axes in a figure.
Figure
The Axes is built in the Figure
fig.
The Axes is built in the rectangle rect. rect is in Figure
coordinates.
Axes
, optional
The x or y axis
is shared with the x or y axis in the input Axes
.
Whether the Axes frame is visible.
Set a fixed aspect for the Axes box, i.e. the ratio of height to width. See set_box_aspect
for details.
Other optional keyword arguments:
Property | Description |
---|---|
{'box', 'datalim'} | |
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
scalar or None | |
(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...} | |
bool | |
{'auto', 'equal'} or float | |
bool | |
bool | |
bool | |
Callable[[Axes, Renderer], Bbox] | |
bool or 'line' | |
float or None | |
bool | |
Patch or (Path, Transform) or None | |
| color |
bool | |
str | |
bool | |
object | |
bool | |
unknown | |
None or bool or float or callable | |
[left, bottom, width, height] or | |
unknown | |
float or None | |
bool | |
(scale: float, length: float, randomness: float) | |
bool or None | |
str | |
str | |
bool | |
unknown | |
str | |
(bottom: float, top: float) | |
float greater than -0.5 | |
{"linear", "log", "symlog", "logit", ...} or | |
unknown | |
unknown | |
unknown | |
str | |
(bottom: float, top: float) | |
float greater than -0.5 | |
{"linear", "log", "symlog", "logit", ...} or | |
unknown | |
unknown | |
float |
Bases: matplotlib.projections.geo._GeoTransform
Create a new geographical transform.
Resolution is the number of steps to interpolate between each input line segment to approximate its path in curved space.
True if this transform has a corresponding inverse transform.
Return the corresponding inverse transformation.
It holds x == self.inverted().transform(self.transform(x))
.
The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
Apply only the non-affine part of this transformation.
transform(values)
is always equivalent to transform_affine(transform_non_affine(values))
.
In non-affine transformations, this is generally equivalent to transform(values)
. In affine transformations, this is always a no-op.
The input values as NumPy array of length input_dims
or shape (N x input_dims
).
The output values as NumPy array of length input_dims
or shape (N x output_dims
), depending on the input.
Bases: matplotlib.projections.geo._GeoTransform
The base Mollweide transform.
Create a new geographical transform.
Resolution is the number of steps to interpolate between each input line segment to approximate its path in curved space.
True if this transform has a corresponding inverse transform.
Return the corresponding inverse transformation.
It holds x == self.inverted().transform(self.transform(x))
.
The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
Apply only the non-affine part of this transformation.
transform(values)
is always equivalent to transform_affine(transform_non_affine(values))
.
In non-affine transformations, this is generally equivalent to transform(values)
. In affine transformations, this is always a no-op.
The input values as NumPy array of length input_dims
or shape (N x input_dims
).
The output values as NumPy array of length input_dims
or shape (N x output_dims
), depending on the input.
Set multiple properties at once.
Supported properties are
Property | Description |
---|---|
{'box', 'datalim'} | |
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
scalar or None | |
(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...} | |
bool | |
{'auto', 'equal'} or float | |
bool | |
bool | |
bool | |
Callable[[Axes, Renderer], Bbox] | |
bool or 'line' | |
float or None | |
bool | |
Patch or (Path, Transform) or None | |
| color |
bool | |
str | |
bool | |
object | |
unknown | |
unknown | |
unknown | |
bool | |
unknown | |
None or bool or float or callable | |
[left, bottom, width, height] or | |
unknown | |
float or None | |
bool | |
(scale: float, length: float, randomness: float) | |
bool or None | |
str | |
str | |
bool | |
unknown | |
str | |
unknown | |
float greater than -0.5 | |
unknown | |
unknown | |
unknown | |
unknown | |
str | |
unknown | |
float greater than -0.5 | |
unknown | |
unknown | |
unknown | |
float |
© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/projections_api.html