argopy.plotters.plot_trajectory

plot_trajectory(df: pandas.core.frame.DataFrame, style: str = 'whitegrid', add_legend: bool = True, palette: str = 'Set1', set_global: bool = False, with_cartopy: bool = False, with_seaborn: bool = False, **kwargs)[source]

Plot trajectories for an Argo index dataframe

This function is called by the Data and Index fetchers method ‘plot’ with the ‘trajectory’ option:

from argopy import IndexFetcher as ArgoIndexFetcher
from argopy import DataFetcher as ArgoDataFetcher
obj = ArgoIndexFetcher().float([6902766, 6902772, 6902914, 6902746])
# OR
obj = ArgoDataFetcher().float([6902766, 6902772, 6902914, 6902746])

fig, ax = obj.plot('trajectory')
Parameters
df: Pandas DataFrame

Input data with columns: ‘wmo’,’longitude’,’latitude’.

style: str

Define the axes style: ‘white’, ‘darkgrid’, ‘whitegrid’, ‘dark’, ‘ticks’. Only used if Seaborn is available.

add_legend: bool

Add a box legend with list of floats. True by default for a maximum of 15 floats, otherwise no legend.

palette: str

Define colors to be used for floats: ‘Set1’ (default) or any other matplotlib colormap or name of a Seaborn palette (deep, muted, bright, pastel, dark, colorblind).

set_global: bool

Plot trajectories on a global world map or not. False by default.

Returns
fig: matplotlib.figure.Figure
ax: matplotlib.axes.Axes