mpas_analysis.shared.plot.add_inset¶
-
mpas_analysis.shared.plot.
add_inset
(fig, fc, latlonbuffer=45.0, polarbuffer=5.0, width=1.0, height=1.0, lowerleft=None, xbuffer=None, ybuffer=None, maxlength=1.0)[source]¶ Plots an inset map showing the location of a transect or polygon. Shapes are plotted on a polar grid if they are entirely poleward of +/-50 deg. latitude and with a lat/lon grid if not.
- Parameters
- fig
matplotlib.figure.Figure
A matplotlib figure to add the inset to
- fc
geometric_features.FeatureCollection
A collection of regions, transects and/or points to plot in the inset
- latlonbufferfloat, optional
The number of degrees lat/lon to use as a buffer around the shape(s) to plot if a lat/lon plot is used.
- polarbufferfloat, optional
The number of degrees latitude to use as a buffer equatorward of the shape(s) in polar plots
- width, heightfloat, optional
width and height in inches of the inset
- lowerleftpair of floats, optional
the location of the lower left corner of the axis in inches, default puts the inset in the upper right corner of
fig
.- xbuffer, ybufferfloat, optional
right and top buffers from the top-right corner (in inches) if lowerleft is
None
.- maxlengthfloat or
None
, optional Any segments longer than maxlength will be subdivided in the plot to ensure curvature. If
None
, no subdivision is performed.
- fig
- Returns
- inset
matplotlib.axes.Axes
The new inset axis
- inset