dandelion.base.plotting.barplot
- dandelion.base.plotting.barplot(data, color, palette='Set1', figsize=(8, 3), normalize=True, sort_descending=True, title=None, xtick_fontsize=None, xtick_rotation=None, min_clone_size=1, clone_key=None, **kwargs)[source]
A barplot function to plot usage of V/J genes in the data.
- Parameters:
data (AnnData | Dandelion) – Dandelion or AnnData object.
color (str) – column name in metadata for plotting in bar plot.
palette (str, optional) – Colors to use for the different levels of the color variable. Should be something that can be interpreted by [color_palette](https://seaborn.pydata.org/generated/seaborn.color_palette.html#seaborn.color_palette), or a dictionary mapping hue levels to matplotlib colors. See [seaborn.barplot](https://seaborn.pydata.org/generated/seaborn.barplot.html).
figsize (tuple[float, float], optional) – figure size.
normalize (bool, optional) – if True, will return as proportion out of 1. Otherwise False will return counts.
sort_descending (bool, optional) – whether or not to sort the order of the plot.
title (str | None, optional) – title of plot.
xtick_fontsize (int | None, optional) – size of x tick labels
xtick_rotation (int | float | None, optional) – rotation of x tick labels.
min_clone_size (int, optional) – minimum clone size to keep.
clone_key (str | None, optional) – column name for clones. None defaults to ‘clone_id’.
**kwargs – passed to sns.barplot.
- Returns:
bar plot.
- Return type:
tuple[Figure,Axes]