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

  • latlonbuffer (float, 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.

  • polarbuffer (float, optional) – The number of degrees latitude to use as a buffer equatorward of the shape(s) in polar plots

  • height (width,) – width and height in inches of the inset

  • lowerleft (pair 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.

  • ybuffer (xbuffer,) – right and top buffers from the top-right corner (in inches) if lowerleft is None.

  • maxlength (float or None, optional) – Any segments longer than maxlength will be subdivided in the plot to ensure curvature. If None, no subdivision is performed.

Returns

inset (matplotlib.axes.Axes) – The new inset axis