trajan.plot.Plot#

class trajan.plot.Plot(ds)[source]#
__init__(ds)[source]#

Methods

__init__(ds)

convex_hull(*args, **kwargs)

Plot the convex hull around all particles

lines(*args, **kwargs)

Plot the trajectory lines.

scatter(*args, **kwargs)

Plot the particles as points.

set_up_map([kwargs_d])

Set up axes for plotting.

Attributes

DEFAULT_LINE_COLOR = 'gray'#
convex_hull(*args, **kwargs)[source]#

Plot the convex hull around all particles

Args:

ax: Use existing axes, otherwise a new one is set up.

crs: Specify crs for new axis.

Returns:

Matplotlib lines, and axes.

ds#
gcrs = None#
lines(*args, **kwargs)[source]#

Plot the trajectory lines.

Args:

ax: Use existing axes, otherwise a new one is set up.

crs: Specify crs for new axis.

Returns:

Matplotlib lines, and axes.

scatter(*args, **kwargs)[source]#

Plot the particles as points.

Args:

ax: Use existing axes, otherwise a new one is set up.

crs: Specify crs for new axis.

Returns:

Matplotlib lines, and axes.

set_up_map(kwargs_d=None, **kwargs)[source]#

Set up axes for plotting.

Args:

crs: Use a different crs than Mercator.

margin: margin (decimal degrees) in addition to extent of trajectories.

land: Add land shapes based on GSHHG to map.

‘auto’ (default): use automatic scaling.

‘c’, ‘l’,’i’,’h’,’f’ or ‘coarse’, ‘low’, ‘intermediate’, ‘high’, ‘full’: use corresponding GSHHG level.

‘mask’ or ‘fast’ (fastest): use a raster mask generated from GSHHG.

None: do not add land shapes.

Returns:

An matplotlib axes with a Cartopy projection.