matplotlib.pyplot.gca#

matplotlib.pyplot.gca()[source]#

Get the current Axes.

If there is currently no Axes on this Figure, a new one is createdusingFigure.add_subplot. (To test whether there is currently anAxes on a Figure, check whetherfigure.axes is empty. To testwhether there is currently a Figure on the pyplot figure stack, checkwhetherpyplot.get_fignums() is empty.)

Notes

Note

This is thepyplot wrapper forFigure.gca.

Examples usingmatplotlib.pyplot.gca#

Annotated heatmap

Annotated heatmap

Multicolored lines

Multicolored lines

Set and get properties

Set and get properties

Hinton diagrams

Hinton diagrams

Manage multiple figures in pyplot

Manage multiple figures in pyplot

Scale invariant angle label

Scale invariant angle label

Tight layout guide

Tight layout guide