dandelion.plotting.spectratype

dandelion.plotting.spectratype(self, color, groupby, locus, clone_key=None, figsize=(6, 4), width=None, title=None, xtick_rotation=None, hide_legend=True, legend_options=None, labels=None, **kwargs)[source]

A spectratype function to plot usage of CDR3 length in the data split by groups.

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

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

  • groupby (str) – column name in metadata to split by during plotting.

  • locus (str) – either IGH or IGL.

  • figsize (Tuple[Union[int,float], Union[int,float]]) – figure size. Default is (6, 4).

  • width (float, int, optional) – width of bars.

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

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

  • hide_legend (bool) – whether or not to hide the legend.

  • legend_options (Tuple[str, Tuple[float, float], int]) – a tuple holding 3 options for specify legend options: 1) loc (string), 2) bbox_to_anchor (tuple), 3) ncol (int).

  • labels (Sequence, optional) – Names of objects will be used for the legend if list of multiple dataframes supplied.

  • **kwargs – other kwargs passed to matplotlib.pyplot.plot

Returns

Return type

sectratype plot