matplotlibXtns package

Submodules

matplotlibXtns.matplotlibXtns module

matplotlibXtns.matplotlibXtns.asymmetric_cmap_around_zero(vmin, vmax, **opts)

Construct LinearSegmentedColormap with linear gradient between end point colors and midcolors, where the mid-point is set at 0 in between vmin and vmax. Calls asymmetric_divergent_cmap to generate colormap.

Parameters
  • vmin (float) – minimum value for colormap

  • vmax (float) – maximum value for colormap

  • opts – additional arguments passed to asymmetric_divergent_cmap

Returns

Dictionary with cmap, vmin and vmax keys and respective definitions for unfolding into matplotlib color plot functions.

matplotlibXtns.matplotlibXtns.asymmetric_divergent_cmap(point0, colorlow='xkcd:reddish', colorhigh='xkcd:petrol', color0_low='w', color0_up=0, n=256)

Construct LinearSegmentedColormap with linear gradient between end point colors and midcolors, where the mid-point may be moved to any relative position in between 0 and 1.

Parameters
  • point0 (float) – relative position between 0 and 1 where color0_low and color0_up apply

  • colorlow (valid matplotlib color specification) – color at low limit of colormap

  • colorhigh (valid matplotlib color specification) – color at high limit of colormap

  • color0_low (valid matplotlib color specification) – color at point0 approached from lower values

  • color0_high (valid matplotlib color specification) – color at point0 approached from higher value

  • n (integer) – color resolution

Returns

LinearSegmentedColormap

matplotlibXtns.matplotlibXtns.chlMapFun(Nlev=256)

Natural colour like colormap for chlorophyll-a plots.

Parameters

Nlev (integer) – number of colour levels

Returns

LinearSegmentedColormap

matplotlibXtns.matplotlibXtns.cmap_map(function, cmap)

Manipulates a colormap by applying function on colormap cmap. This routine will break any discontinuous points in a colormap.

Parameters
  • function – function to apply on cmap. Has to take a single argument with sequence of shape N,3 [r, g, b].

  • cmap – colormap to apply function on.

Returns

Linear Segmented Colormap with function applied.

matplotlibXtns.matplotlibXtns.discreteColors(noc, cols=['r', 'b', '#FFF000', 'g', 'm', 'c', '#FF8000', '#400000', '#004040', 'w', 'b'])

Generate a colormap from list of discrete input colours.

Parameters
  • noc (integer) – number of desired discrete colours.

  • cols (list of matplotlib colours) – sequence of colours to use. If < noc repeated up to required length.

Returns

LinearSegmentedColormap with discrete colours.

matplotlibXtns.matplotlibXtns.discreteGreys(nog)

Generate a colormap with discrete number shades of grey.

Parameters

nog (integer) – number of levels of grey.

Returns

LinearSegmentedColormap with discrete grey levels.

matplotlibXtns.matplotlibXtns.discretizeColormap(colmap, N)

Constructs colormap with N discrete color levels from continous map.

Parameters
  • colmap (matplotlib.colors.colormap or derived instance) – colormap from which to pick discrete colours;

  • N (integer) – number of colour levels

Returns

discrete colormap (matplotlib.colors.LinearSegmentedColormap).

matplotlibXtns.matplotlibXtns.findXYDuplicates(x, y, d, preserveMask=False)

Finds duplicates in position for data given in x,y coordinates.

Parameters
  • x (1d-array) – X-coordinate

  • y (1d-array) – Y-coordinate

  • d (1d-array) – data defined on x,y

  • preserveMask – flag to preserve mask of input data

Returns

x,y,d and duplicate mask (0 where duplicate), sorted by x,y

matplotlibXtns.matplotlibXtns.getDistance(lon1, lat1, lon2, lat2, geoid='WGS84')

Get distance betwwen two points on the earth surface.

Parameters
  • lon1 (float) – longitude of first point

  • lat1 (float) – latitude of first point

  • lon2 (float) – longitude of second point

  • lat2 (float) – latitude of second point

  • geoid (string) – geoid to use for projection

Returns

distance in km (float)

matplotlibXtns.matplotlibXtns.hcolorbar(shrink=0.5, pad=0.05, **opts)

Horizontal colorbar.

Parameters
  • shrink (float) – shriking factor

  • pad (float) – padding to separate colorbar from other axes, expressed as fraction of original axes

  • **opts – other options passed to colorbar function

Returns

colorbar instance

class matplotlibXtns.matplotlibXtns.hovmoeller(t, dz, Var, contours=10, ztype='z', orientation='up', surface_zoom=True, zoom_obj=<matplotlibXtns.matplotlibXtns.surface_zoom object>, ax=0, lineopts={}, **opts)

Bases: object

Class for plotting of hovmoeller diagrams using the contourf function, using surface zoom (optionally).

Variables
  • zoom (surface_zoom instance) – projection to use for vertical coordinate

  • contours (matplotlib.contour.QuadContourSet) – contour set with filled contour levels of plot

  • contourlines (matplotlib.contour.QuadContourSet) – lines

  • ax (matplotlib.axes.Axes) – Axes to be used for plot

__dict__ = mappingproxy({'__module__': 'matplotlibXtns.matplotlibXtns', '__doc__': 'Class for plotting of hovmoeller diagrams using the contourf function,\n  using surface zoom (optionally).\n\n  Attributes:\n    zoom (surface_zoom instance): projection to use for vertical coordinate\n    contours (matplotlib.contour.QuadContourSet): contour set with filled\n        contour levels of plot\n    contourlines (matplotlib.contour.QuadContourSet) contour set with contour\n        lines\n    ax (matplotlib.axes.Axes): Axes to be used for plot\n  ', '__init__': <function hovmoeller.__init__>, 'set_ticks': <function hovmoeller.set_ticks>, '__dict__': <attribute '__dict__' of 'hovmoeller' objects>, '__weakref__': <attribute '__weakref__' of 'hovmoeller' objects>, '__annotations__': {}})
__init__(t, dz, Var, contours=10, ztype='z', orientation='up', surface_zoom=True, zoom_obj=<matplotlibXtns.matplotlibXtns.surface_zoom object>, ax=0, lineopts={}, **opts)

Defines basic settings and geometry and plots a hovmoeller diagram.

Parameters
  • t (integer, float or datetime 1D-array) – horizontal coordinate.

  • dz (float 1D-array) – thickness of vertical coordinate levels or vertical coordinate depending on ztype argument.

  • Var (integer or float 2D-array) – data array with dimensions len(dz),len(t)

  • contours (any object accepted as third argument by the contourf function) – contour argument to pass to contourf function

  • ztype (string) – definition of dz (vertical coordinate) type. For ztype=-“dz” dz is interpreted as vertical cell thickness, otherwise as cell centres.

  • orientation (string) – if not “up”, the vertical coordinate is flipped.

  • surface_zoom (boolean) – if True the vertical coordinate is projected using zoom_obj.

  • ax (matplotlib.axes.Axes) – Axes to be used for plot (if 0, creates a new figure and axes).

  • lineopts (dictionary) – dictionary with options for contour lines passed to the contourf function.

  • **opts – keyword options passed to the contourf function.

__module__ = 'matplotlibXtns.matplotlibXtns'
__weakref__

list of weak references to the object (if defined)

set_ticks(ticks, ticklables=())

Sets ticks and ticklabels of vertical axis in hovmoeller diagram.

Parameters
  • ticks (sequence of floats) – positions of vertical ticks

  • ticklables (sequence of strings) – strings to be used as ticklables, if empty, these will be generated automatically from ticks.

matplotlibXtns.matplotlibXtns.plotDataRange(x, ycentre, yupper, ylower, yup, ylow, linetype='-', color='r', fillcolor='0.8', edgecolor='k', alpha=1.0)

Plots data range over x, given by series of centre, upper and lower values.

Parameters
  • x (float,intger, datetime series) – x coordinate

  • ycentre (float,integer series) – midlle or average values of range to show, plotted as line

  • yupper (float,integer series) – upper limit of values, plotted as upper edge line

  • ylower (float,integer series) – lower limit of values, plotted as lower edge line

  • yup (float,integer series) – values on the higher end of range to show, plotted as dotted line

  • ylow (float,integer series) – values on the lower end of range to show, plotted as dotted line

  • linetype (plot [fmt] argument) – line format used for ycentre

  • color (matplotlib color) – colour used for ycentre line

  • fillcolor (matplotlib color) – colour used to fille space between yupper and ylower

  • edgecolor (matplotlib color) – colour used for limiting lines

  • alpha (float) – transparency level of filling colour

matplotlibXtns.matplotlibXtns.plotFullDataRange(x, ycentre, yupper, ylower, yup, ylow, yu, yl, color='r', fillcolor='0.8', edgecolor='k', alpha=1.0)

Plots data range over x, given by series of centre, upper and lower values.

Parameters
  • x (float,intger, datetime series) – x coordinate

  • ycentre (float,integer series) – midlle or average values of range to show, plotted as line

  • yupper (float,integer series) – upper limit of values, plotted as upper edge line

  • ylower (float,integer series) – lower limit of values, plotted as lower edge line

  • yup (float,integer series) – values on the higher end of range to show, plotted as dashedline

  • ylow (float,integer series) – values on the lower end of range to show, plotted as dashed line

  • yu (float,integer series) – additional set of values on the higher end of range to show, plotted as dotted line

  • yl (float,integer series) – additional set of values on the lower end of range to show, plotted as dotted line

  • linetype (plot [fmt] argument) – line format used for ycentre

  • color (matplotlib color) – colour used for ycentre line

  • fillcolor (matplotlib color) – colour used to fille space between yupper and ylower

  • edgecolor (matplotlib color) – colour used for limiting lines

  • alpha (float) – transparency level of filling colour

matplotlibXtns.matplotlibXtns.plotSmallDataRange(x, ycentre, yupper, ylower, linetype='-', color='r', fillcolor='0.8', edgecolor='k', alpha=1.0)

Plots data range over x, given by series of centre, upper and lower values.

Parameters
  • x (float,intger, datetime series) – x coordinate

  • ycentre (float,integer series) – midlle or average values of range to show, plotted as line

  • yupper (float,integer series) – upper limit of values, plotted as upper edge line

  • ylower (float,integer series) – lower limit of values, plotted as lower edge line

  • linetype (plot [fmt] argument) – line format used for ycentre

  • color (matplotlib color) – colour used for ycentre line

  • fillcolor (matplotlib color) – colour used to fille space between yupper and ylower

  • edgecolor (matplotlib color) – colour used for limiting lines

  • alpha (float) – transparency level of filling colour

matplotlibXtns.matplotlibXtns.plotSpread(x, data, range=1, **opts)

Plot data spread over y along x coordinate.

Parameters
  • x – coordinate of length N

  • data – data of shape [N,K], spread is computed over K dimension, using quantiles.

  • range – sets quantiles to use for plotting. 1 - plot quantiles [.05,.25,.5,.75,.95] 2 - plot quantiles [.01,.05,.25,.5,.75,.95,.99] else plot quantiles [.25,.5,.75,]

matplotlibXtns.matplotlibXtns.removeXYDuplicates(x, y, d, mask=False)

Removes duplicates in position for data given in x,y coordinates.

Parameters
  • x (1d-array) – X-coordinate

  • y (1d-array) – Y-coordinate

  • d (1d-array) – data defined on x,y

  • mask – flag to preserve mask of input data

Returns

x,y,d with duplicates removed, sorted by x,y

class matplotlibXtns.matplotlibXtns.surface_zoom(n=3)

Bases: object

Class with depth transformation function for zooming towards the ocean surface and its inverse in order to provide tick lables. Assumes negative z values.

__call__(z)

Transformation of array of depth levels applying mapping function __func__.

Parameters

z (array of floats) – original depth values.

Returns

mapping function applied on input z.

__dict__ = mappingproxy({'__module__': 'matplotlibXtns.matplotlibXtns', '__doc__': 'Class with depth transformation function for zooming towards the\n    ocean surface and its inverse in order to provide tick lables.\n    Assumes negative z values.', '__init__': <function surface_zoom.__init__>, '__func__': <function surface_zoom.__func__>, 'inv': <function surface_zoom.inv>, '__call__': <function surface_zoom.__call__>, '__dict__': <attribute '__dict__' of 'surface_zoom' objects>, '__weakref__': <attribute '__weakref__' of 'surface_zoom' objects>, '__annotations__': {}})
__func__(z)
Mapping function (inverse power function) applied to project actual

depth.

Parameters

z (float array) – original depth coordinates

Returns

projected depth coordinates (float array)

__init__(n=3)

Defines zoom level via exponent of the inverse power mappings of vertical levels of the form: (z**1/n), where n can be chosen by the user.

Parameters

n (integer) – exponent of mapping function

__module__ = 'matplotlibXtns.matplotlibXtns'
__weakref__

list of weak references to the object (if defined)

inv(z)

Inverse mapping function to obtain original depth coordinates from projected ones.

Parameters

z (float array) – levels in projected coordinates

Returns

Levels in original coordinates (float array).

matplotlibXtns.cartopyXtns module

class matplotlibXtns.cartopyXtns.globalOceanMap(lon0=0.0, prj=<class 'cartopy.crs.Mollweide'>, *args, **opts)

Bases: matplotlibXtns.cartopyXtns.oceanMap

Class for global ocean maps.

Variables
  • prj (cartopy.crs instance) – projection used

  • ref_prj (cartopy.crs instance) – reference projection used for coordinate conversion

__init__(lon0=0.0, prj=<class 'cartopy.crs.Mollweide'>, *args, **opts)

Set-up projection to use for map.

Parameters
  • lon_0 (float) – central longitude

  • prj (string or cartopy.crs instance) – projection used, currently implemented for Mollweide or PlateCarree (in case of string argument “Mollweide” or “PlateCarree”)

  • *args,**opts – passed to prj.__init__ function.

__module__ = 'matplotlibXtns.cartopyXtns'
matplotlibXtns.cartopyXtns.mask_feature(x2d, y2d, feat=<cartopy.feature.NaturalEarthFeature object>, eps=1e-05)
class matplotlibXtns.cartopyXtns.oceanMap(lon0=0.0, prj=<class 'cartopy.crs.PlateCarree'>, *args, **opts)

Bases: object

Base class for globalOceanMap and regionalOceanMap only, not to be used for creating instances directly.

Variables
  • prj (cartopy.crs instance) – projection used

  • ref_prj (cartopy.crs instance) – reference projection used for coordinate conversion

__dict__ = mappingproxy({'__module__': 'matplotlibXtns.cartopyXtns', '__doc__': 'Base class for globalOceanMap and regionalOceanMap only, not to be\n        used for creating instances directly.\n\n        Attributes:\n            prj (cartopy.crs instance): projection used\n            ref_prj (cartopy.crs instance): reference projection used for\n                coordinate conversion\n        ', '__init__': <function oceanMap.__init__>, 'contourf': <function oceanMap.contourf>, 'pcolormesh': <function oceanMap.pcolormesh>, 'interpolate': <function oceanMap.interpolate>, 'interpolated_contourf': <function oceanMap.interpolated_contourf>, 'interpolated_pcolormesh': <function oceanMap.interpolated_pcolormesh>, '__dict__': <attribute '__dict__' of 'oceanMap' objects>, '__weakref__': <attribute '__weakref__' of 'oceanMap' objects>, '__annotations__': {}})
__init__(lon0=0.0, prj=<class 'cartopy.crs.PlateCarree'>, *args, **opts)

Set-up projection to use for map.

Parameters
  • lon_0 (float) – central longitude

  • prj (string or cartopy.crs instance) – projection used, currently implemented for Mollweide or PlateCarree (in case of string argument “Mollweide” or “PlateCarree”)

  • *args,**opts – passed to prj.__init__ function.

__module__ = 'matplotlibXtns.cartopyXtns'
__weakref__

list of weak references to the object (if defined)

contourf(x, y, *args, land_colour='#485259', land_res='50m', f=False, ax=False, colourbar=True, **opts)

Contour plot over global ocean in native projection coordinates.

Parameters
  • x (float array) – x-coordinate

  • y (float array) – y-coordinate

  • *args – positional arguments passed to matplotlib.pyplot.contourf function

  • land_colour – fill colour for land parts of map

  • land_res – resolution of coastline, see cartopy.feature.NaturalEarthFeature

  • f (matplotlib.figure.figure) – figure to use for plot, if False creates new figure

  • ax (matplotlib.axes.Axes) – axes to use, if False creates new Axes

  • colourbar (boolean) – if True adds colourbar to plot

  • **opts – keyword arguments passed to matplotlib.pyplot.contourf

Returns

tuple with matplotlib.contou.QuadContourSet and matplotlib.colorbar.Colorbar instances.

interpolate(lon, lat, data, *args, res=360.0, bounds=False, zoom=0, mask=False, **opts)

Projects and interpolates data from grid defined in longitudes and latitudes to regular grid in native projection coordinates using scipy.interpolate.griddata function.

Parameters
  • lon – (float array): longitudes of data to project and interpolate (same shape required)

  • lat – (float array): latitudes of data to project and interpolate (same shape required)

  • data – (float array): data to project and interpolate

  • *args – positional arguments passed to griddata function for interpolation

  • res (float) – number of horizontal pixels of regular interpolated grid

  • bounds (boolean) – if True creates also coordinate bounds

  • zoom (integer) – zoom of global map, given as percentage of full map to be shown, 0 means no zoom

  • mask (boolean) – consider data mask in interpolation

  • **opts – keyword arguments to be passed to griddata function for interpolation

Returns

tuple of interpolated x and y in projection coordinates, interpolated data (and x and y bounds if bounds=True)

interpolated_contourf(lon, lat, data, *args, res=360.0, land_colour='#485259', land_res='50m', f=False, ax=False, colourbar=True, zoom=0, mask=False, **opts)

Contour plot over global ocean interpolating from lon,lat coordinates.

Parameters
  • lon (float array) – longitudinal coordinates of data (same shape required)

  • lat (float array) – latitudinal coordinates of data (same shape required)

  • data (float array) – data array to interpolate

  • *args – positional arguments passed to matplotlib.pyplot.contourf function

  • res (float) – number of horizontal pixels of regular interpolated grid

  • land_colour – fill colour for land parts of map

  • land_res – resolution of coastline, see cartopy.feature.NaturalEarthFeature

  • f (matplotlib.figure.figure) – figure to use for plot, if False creates new figure

  • ax (matplotlib.axes.Axes) – axes to use, if False creates new Axes

  • colourbar (boolean) – if True adds colourbar to plot

  • **opts – keyword arguments passed to matplotlib.pyplot.contourf

  • zoom (integer) – zoom of global map, given as percentage of full map to be shown, 0 means no zoom

  • mask (boolean) – consider data mask in interpolation

  • **opts – keyword arguments passed to matplotlib.pyplot.contourf

Returns

tuple with matplotlib.contou.QuadContourSet and matplotlib.colorbar.Colorbar instances.

interpolated_pcolormesh(lon, lat, data, *args, res=360.0, land_colour='#485259', land_res='50m', f=False, ax=False, colourbar=True, zoom=0, mask=False, **opts)

Pcolormesh plot over global ocean interpolating from lon,lat coordinates.

Parameters
  • lon (float array) – longitudinal coordinates of data (same shape required)

  • lat (float array) – latitudinal coordinates of data (same shape required)

  • data (float array) – data array to interpolate

  • *args – positional arguments passed to matplotlib.pyplot.contourf function

  • res (float) – number of horizontal pixels of regular interpolated grid

  • land_colour – fill colour for land parts of map

  • land_res – resolution of coastline, see cartopy.feature.NaturalEarthFeature

  • f (matplotlib.figure.figure) – figure to use for plot, if False creates new figure

  • ax (matplotlib.axes.Axes) – axes to use, if False creates new Axes

  • colourbar (boolean) – if True adds colourbar to plot

  • zoom (integer) – zoom of global map, given as percentage of full map to be shown, 0 means no zoom

  • mask (boolean) – consider data mask in interpolation

  • **opts – keyword arguments passed to matplotlib.pyplot.pcolormesh

Returns

tuple with matplotlib.collections.QuadMesh and matplotlib.colorbar.Colorbar instances.

pcolormesh(x, y, *args, land_colour='#485259', land_res='50m', f=False, ax=False, colourbar=True, **opts)

Pcolormesh plot over global ocean in native projection coordinates.

Parameters
  • x (float array) – x-coordinate

  • y (float array) – y-coordinate

  • *args – positional arguments passed to matplotlib.pyplot.pcolormesh function

  • land_colour – fill colour for land parts of map

  • land_res – resolution of coastline, see cartopy.feature.NaturalEarthFeature

  • f (matplotlib.figure.figure) – figure to use for plot, if False creates new figure

  • ax (matplotlib.axes.Axes) – axes to use, if False creates new Axes

  • colourbar (boolean) – if True adds colourbar to plot

  • **opts – keyword arguments passed to matplotlib.pyplot.contourf

Returns

tuple with matplotlib.collections.QuadMesh and matplotlib.colorbar.Colorbar instances.

class matplotlibXtns.cartopyXtns.regionalOceanMap(lon0=0.0, lat0=0.0, prj=<class 'cartopy.crs.AlbersEqualArea'>, **opts)

Bases: matplotlibXtns.cartopyXtns.oceanMap

Class for global ocean maps.

Variables
  • prj (cartopy.crs instance) – projection used

  • ref_prj (cartopy.crs instance) – reference projection used for coordinate conversion

__init__(lon0=0.0, lat0=0.0, prj=<class 'cartopy.crs.AlbersEqualArea'>, **opts)

Set-up projection to use for map.

Parameters
  • lon_0 (float) – central longitude

  • prj (string or cartopy.crs instance) – projection used, currently implemented for Mollweide or PlateCarree (in case of string argument “Mollweide” or “PlateCarree”)

  • *args,**opts – passed to prj.__init__ function.

__module__ = 'matplotlibXtns.cartopyXtns'
interpolate(lon, lat, data, *args, res=360.0, bounds=False, zoom=101, method='linear', **opts)

Projects and interpolates data from grid defined in longitudes and latitudes to regular grid in native projection coordinates using scipy.interpolate.griddata function.

Parameters
  • lon – (float array): longitudes of data to project and interpolate (same shape required)

  • lat – (float array): latitudes of data to project and interpolate (same shape required)

  • data – (float array): data to project and interpolate

  • *args – positional arguments passed to griddata function for interpolation

  • res (float) – number of horizontal pixels of regular interpolated grid

  • bounds (boolean) – if True creates also coordinate bounds

  • zoom (integer) – zoom of global map, given as percentage of full map to be shown, 0 means no zoom

  • mask (boolean) – consider data mask in interpolation

  • **opts – keyword arguments to be passed to griddata function for interpolation

Returns

tuple of interpolated x and y in projection coordinates, interpolated data (and x and y bounds if bounds=True)

interpolated_contourf(lon, lat, data, *args, res=360.0, land_colour='#485259', land_res='50m', f=False, ax=False, colourbar=True, zoom=101, **opts)

Contour plot over global ocean interpolating from lon,lat coordinates.

Parameters
  • lon (float array) – longitudinal coordinates of data (same shape required)

  • lat (float array) – latitudinal coordinates of data (same shape required)

  • data (float array) – data array to interpolate

  • *args – positional arguments passed to matplotlib.pyplot.contourf function

  • res (float) – number of horizontal pixels of regular interpolated grid

  • land_colour – fill colour for land parts of map

  • land_res – resolution of coastline, see cartopy.feature.NaturalEarthFeature

  • f (matplotlib.figure.figure) – figure to use for plot, if False creates new figure

  • ax (matplotlib.axes.Axes) – axes to use, if False creates new Axes

  • colourbar (boolean) – if True adds colourbar to plot

  • **opts – keyword arguments passed to matplotlib.pyplot.contourf

  • zoom (integer) – zoom of global map, given as percentage of full map to be shown, 0 means no zoom

  • mask (boolean) – consider data mask in interpolation

  • **opts – keyword arguments passed to matplotlib.pyplot.contourf

Returns

tuple with matplotlib.contou.QuadContourSet and matplotlib.colorbar.Colorbar instances.

interpolated_pcolormesh(lon, lat, data, *args, res=360.0, land_colour='#485259', land_res='50m', f=False, ax=False, colourbar=True, zoom=101, **opts)

Pcolormesh plot over global ocean interpolating from lon,lat coordinates.

Parameters
  • lon (float array) – longitudinal coordinates of data (same shape required)

  • lat (float array) – latitudinal coordinates of data (same shape required)

  • data (float array) – data array to interpolate

  • *args – positional arguments passed to matplotlib.pyplot.contourf function

  • res (float) – number of horizontal pixels of regular interpolated grid

  • land_colour – fill colour for land parts of map

  • land_res – resolution of coastline, see cartopy.feature.NaturalEarthFeature

  • f (matplotlib.figure.figure) – figure to use for plot, if False creates new figure

  • ax (matplotlib.axes.Axes) – axes to use, if False creates new Axes

  • colourbar (boolean) – if True adds colourbar to plot

  • zoom (integer) – zoom of global map, given as percentage of full map to be shown, 0 means no zoom

  • mask (boolean) – consider data mask in interpolation

  • **opts – keyword arguments passed to matplotlib.pyplot.pcolormesh

Returns

tuple with matplotlib.collections.QuadMesh and matplotlib.colorbar.Colorbar instances.

Module contents

matplotlibXtns package initialisation.