argopy.plot.bar_plot#
- bar_plot(df: DataFrame, by: str = 'institution', style: str = 'whitegrid', with_seaborn: bool = False, **kwargs)[source]#
Create a bar plot for an Argo index dataframe
This is the method called when using the facade fetcher methods
plot
with thedac
orprofiler
arguments:IndexFetcher(src='gdac').region([-80,-30,20,50,'2021-01','2021-08']).plot('dac')
To use it directly, you must pass a
pandas.DataFrame
as returned by aargopy.DataFetcher.index
orargopy.IndexFetcher.index
property:from argopy import IndexFetcher df = IndexFetcher(src='gdac').region([-80,-30,20,50,'2021-01','2021-08']).index bar_plot(df, by='profiler')
- Parameters:
df (
pandas.DataFrame
) – As returned by a fetcher index propertyby (str, default='institution') – The profile property to plot
style (str, optional) – Define the Seaborn axes style: ‘white’, ‘darkgrid’, ‘whitegrid’, ‘dark’, ‘ticks’
- Returns:
fig (
matplotlib.figure.Figure
)ax (
matplotlib.axes.Axes
)