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 createdusing
Figure.add_subplot. (To test whether there is currently anAxes on a Figure, check whetherfigure.axesis empty. To testwhether there is currently a Figure on the pyplot figure stack, checkwhetherpyplot.get_fignums()is empty.)The following kwargs are supported for ensuring the returned Axesadheres to the given projection etc., and for Axes creation ifthe 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 and two offsets from the bottom left corner of the image
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
facecoloror fccolor
bool
str
bool
object
bool
unknown
None or bool or float or callable
[left, bottom, width, height] or
Bboxunknown
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
ScaleBaseunknown
unknown
unknown
str
(bottom: float, top: float)
float greater than -0.5
{"linear", "log", "symlog", "logit", ...} or
ScaleBaseunknown
unknown
float