insitupy.plotting.cell_abundance_along_axis#
- insitupy.plotting.cell_abundance_along_axis(adata, axis, groupby=None, xlim=(0, inf), savepath=None, figsize=(8, 6), save_only=False, dpi_save=300, multiple='stack', histplot_element='bars', kde=False)#
Plot cell abundance along a specified observation value.
- Parameters:
adata (AnnData) – Annotated data matrix.
axis (Union[str, Tuple[str, str]]) – Observation category to be plotted on the x-axis. Can be a string representing a column in
adata.obsor a tuple (obsm_key, obsm_col) whereobsm_keyis a key inadata.obsmandobsm_colis a column in the corresponding DataFrame.groupby (Optional[str], optional) – Column in
adata.obsto group by. Defaults to None.xmin (Number, optional) – Minimum value of
obs_valto include in the plot. Defaults to 0.savepath (Optional[os.PathLike], optional) – Path to save the figure. Defaults to None.
figsize (Tuple, optional) – Size of the figure. Defaults to (8, 6).
save_only (bool, optional) – If True, only save the figure without displaying it. Defaults to False.
dpi_save (int, optional) – Dots per inch for saving the figure. Defaults to 300.
histplot_multiple (str, optional) – How to plot multiple histograms. Options are “layer”, “dodge”, “stack”, “fill”. Defaults to “stack”.
histplot_element (str, optional) – Plotting element. Options are “bars”, “step”, “poly”. Defaults to “bars”.
- Returns:
None