eugene.plot.countplot¶
- eugene.plot.countplot(sdata, vars, groupby=None, orient='h', rc_context={'axes.labelsize': 14, 'axes.titlesize': 16, 'legend.fontsize': 12, 'pdf.fonttype': 42, 'ps.fonttype': 42, 'xtick.labelsize': 12, 'ytick.labelsize': 12}, return_axes=False, **kwargs)¶
Plots a countplot of a vars in a SeqData using Seaborn.
This function can be used to show the counts of observations in a single or multiple columns of seqs_annot within a SeqData. If a groupby is provided then the counts are grouped by the groupby column.
- Parameters:
sdata (SeqData) – SeqData object that contains vars in seqs_annot.
vars (str or list of str) – vars to plot. Will be plotted in separate adjacent subplots.
groupby (str) – Key to group by. If None, will plot counts of each key.
orient (str) – Orientation of plot. Either “h” (horizontal) or “v” (vertical).
rc_context (Mapping[str, str]) – Matplotlib rc context. Default is eugene.settings.rc_context.
return_axes (bool) – Return axes.
**kwargs – Additional keyword arguments to pass to seaborn.
- Return type:
Optional
[Axes
]