matplotlib.pyplot.gca#
- matplotlib.pyplot.gca(**kwargs)[source]#
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 whetherfigure.axes
is empty. To test whether there is currently a Figure on the pyplot figure stack, check whetherpyplot.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
facecolor
or fccolor
bool
str
bool
object
bool
unknown
None or bool or float or callable
[left, bottom, width, height] or
Bbox
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
ScaleBase
unknown
unknown
unknown
str
(bottom: float, top: float)
float greater than -0.5
{"linear", "log", "symlog", "logit", ...} or
ScaleBase
unknown
unknown
float