dandelion.plotting.barplot

dandelion.plotting.barplot(self, color, palette='Set1', figsize=(12, 4), normalize=True, sort_descending=True, title=None, xtick_rotation=None, min_clone_size=None, clone_key=None, **kwargs)[source]

A barplot function to plot usage of V/J genes in the data.

Parameters
  • self (Dandelion, AnnData) – Dandelion or AnnData object.

  • color (str) – column name in metadata for plotting in bar plot.

  • palette (str) – 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[Union[int,float], Union[int,float]]) – figure size. Default is (12, 4).

  • normalize (bool) – if True, will return as proportion out of 1, otherwise False will return counts. Default is True.

  • sort_descending (bool) – whether or not to sort the order of the plot. Default is True.

  • title (str, optional) – title of plot.

  • xtick_rotation (int, float, optional) – rotation of x tick labels.

  • min_clone_size (int, optional) – minimum clone size to keep. Defaults to 1 if left as None.

  • clone_key (str, optional) – column name for clones. None defaults to ‘clone_id’.

  • **kwargs – passed to sns.barplot.

Returns

Return type

a seaborn barplot.