Get the current Axes.
If there is currently no Axes on this Figure, a new one is created using Figure.add_subplot
. (To test whether there is currently an Axes on a Figure, check whether figure.axes
is empty. To test whether there is currently a Figure on the pyplot figure stack, check whether pyplot.get_fignums()
is empty.)
The following kwargs are supported for ensuring the returned Axes adheres to the given projection etc., and for Axes creation if the active Axes does not exist:
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 |
matplotlib.pyplot.gca
© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/_as_gen/matplotlib.pyplot.gca.html