Figure.subplot¶
- Figure.subplot(*args, **kwargs)[source]¶
Add a subplot axes to the figure.
- Parameters
*args (
int,tuple, orSubplotSpec, optional) – The subplot location specifier. Your options are:A single 3-digit integer argument specifying the number of rows, number of columns, and gridspec number (using row-major indexing).
Three positional arguments specifying the number of rows, number of columns, and gridspec number (int) or number range (2-tuple of int).
A
SubplotSpecinstance generated by indexing a proplotGridSpec.
For integer input, the implied geometry must be compatible with the implied geometry from previous calls – for example,
fig.add_subplot(331)followed byfig.add_subplot(132)is valid because the 1 row of the second input can be tiled into the 3 rows of the the first input, butfig.add_subplot(232)will raise an error because 2 rows cannot be tiled into 3 rows. ForSubplotSpecinput, theSubplotSpecmust be derived from theGridSpecused in previous calls.These restrictions arise because we allocate a single, unique
gridspecfor each figure.number (
int, optional) – The axes number used for a-b-c labeling. Seeformatfor details. By default this is incremented automatically based on the other subplots in the figure. Use0orFalseto ensure the subplot has no a-b-c label. Note the number corresponding toais1, not0.autoshare (
bool, optional) – Whether to automatically share the x and y axes with subplots spanning the same rows and columns based on the figure-widesharexandshareysettings. Default isTrue. This has no effect ifrc['subplots.share']isFalseor ifsharex=Falseorsharey=Falsewere passed to the figure.proj, projection (
str,cartopy.crs.Projection, orBasemap, optional) – The map projection specification(s). If'cart'or'cartesian'(the default), aCartesianAxesis created. If'polar', aPolarAxesis created. Otherwise, the argument is interpreted byProj, and the result is used to make aGeoAxes(in this case the argument can be acartopy.crs.Projectioninstance, aBasemapinstance, or a projection name listed in this table).proj_kw, projection_kw (dict-like, optional) – Keyword arguments passed to
Basemapor cartopyProjectionclasses on instantiation.basemap (
boolor dict-like, optional) – Whether to useBasemaporProjectionfor map projections. Default isrc.basemap=False.
- Other Parameters
**kwargs – Passed to the proplot class
proplot.axes.CartesianAxes,proplot.axes.PolarAxes,proplot.axes.GeoAxes, orproplot.axes.ThreeAxes. This can include keyword arguments for projection-specificformatcommands.