argopy.plot.bar_plot#
- bar_plot(df: DataFrame, by: str = 'institution', style: str = 'argopy', with_seaborn: bool = True, **kwargs)[source]#
Create a bar plot for an Argo index dataframe
Pass a
pandas.DataFrameas returned by aargopy.DataFetcher.indexorargopy.ArgoIndex.to_dataframefrom argopy import DataFetcher df = DataFetcher(src='gdac').region([-80,-30,20,50,'2021-01','2021-08']).index bar_plot(df, by='profiler')
- Parameters:
df (
pandas.DataFrame) – As returned by an argopy index dataframeby (str, default='institution') – The profile property to plot
style (str, optional) – Define the Seaborn axes style: ‘argopy’, ‘white’, ‘darkgrid’, ‘whitegrid’, ‘dark’, ‘ticks’
- Returns:
fig (
matplotlib.figure.Figure)ax (
matplotlib.axes.Axes)