trajan.plot
Submodules
Package Contents
Classes
Functions
|
Plot the landmask or the shapes from GSHHG. |
Attributes
- trajan.plot.add_land(ax, lonmin, latmin, lonmax, latmax, fast, ocean_color='white', land_color=cfeature.COLORS['land'], lscale='auto', globe=None)
Plot the landmask or the shapes from GSHHG.
- trajan.plot.logger
- trajan.plot.disabled = True
- class trajan.plot.Plot(ds)
- ds :xarray.Dataset
- gcrs
- DEFAULT_LINE_COLOR = gray
- set_up_map(kwargs_d=None, **kwargs)
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.
- __call__(*args, **kwargs)
- lines(*args, **kwargs)
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.