cellcharter.pl.proportion#
- cellcharter.pl.proportion(adata, group_key, label_key, groups=None, labels=None, rotation_xlabel=45, ncols=1, normalize=True, palette=None, figsize=None, dpi=None, save=None, **kwargs)#
Plot the proportion of
y_keyinx_key.- Parameters:
adata (
AnnData) – Annotated data object.group_key (
str) – Key inanndata.AnnData.obswhere groups are stored.label_key (
str) – Key inanndata.AnnData.obswhere labels are stored.groups (
Optional[list] (default:None)) – List of groups to plot.labels (
Optional[list] (default:None)) – List of labels to plot.rotation_xlabel (
int(default:45)) – Rotation in degrees of the ticks of the x axis.ncols (
int(default:1)) – Number of columns for the legend.normalize (
bool(default:True)) – IfTrueuse relative frequencies, outherwise use counts.palette (
Union[str,ListedColormap,None] (default:None)) – Categorical colormap for the clusters. IfNone, useanndata.AnnData.uns['{{cluster_key}}_colors'], if available.figsize (
Optional[tuple[float,float]] (default:None)) – Size of the figure in inches.save (
Union[str,Path,None] (default:None)) – Whether to save the plot.kwargs – Keyword arguments for
pandas.DataFrame.plot.bar().
- Return type:
- Returns:
Nothing, just plots the figure and optionally saves the plot.