annotate_barplot

hhpy.plotting.annotate_barplot(ax: matplotlib.axes._axes.Axes = None, x: Sequence[T_co] = None, y: Sequence[T_co] = None, ci: bool = True, ci_newline: bool = True, adj_ylim: float = 0.05, nr_format: str = None, ha: str = 'center', va: str = 'center', offset: int = None, **kwargs) → matplotlib.axes._axes.Axes[source]

automatically annotates a barplot with bar values and error bars (if present). Currently does not work with ticks!

Parameters:
  • ax – The matplotlib.pyplot.Axes object to plot on, defaults to current axis [optional]
  • x – Name of the x variable in data or vector data
  • y – Name of the y variable in data or vector data
  • ci – whether to annotate error bars [optional]
  • ci_newline – whether to add a newline between values and error bar values [optional]
  • adj_ylim – whether to automatically adjust the plot y limits to fit the annotations [optional]
  • nr_format – The format string used for annotations [optional]
  • ha – horizontal alignment [optional]
  • va – vertical alignment [optional]
  • offset – offset between bar top and annotation center, defaults to rcParams[font.size] [optional]
  • kwargs – other keyword arguments passed to pyplot.annotate
Returns:

The matplotlib.pyplot.Axes object with the plot on it