insitupy.plotting.cell_expression_along_axis#
- insitupy.plotting.cell_expression_along_axis(adata, axis, genes, cell_type_column, cell_type, xlim=(0, inf), min_expression=0, xlabel=None, fit_reg=False, kde=False, maxcols=4, savepath=None, save_only=False, dpi_save=300, fig_height=4, fig_marginal_ratio=0.15, scatter_size=1, wspace=0.15, hspace=0.25, font_scale_factor=1)#
Plot gene expression along a specified axis for a given cell type.
- Parameters:
adata – AnnData object containing the single-cell data.
axis – Observation value to plot along the x-axis.
genes (List[str]) – List of genes to plot.
cell_type_column – Column name in
adata.obsthat contains cell type information.cell_type – Specific cell type to filter the data.
xlim (Tuple[Union[int, float], Union[int, float]], optional) – Limits for the x-axis. Defaults to (0, np.inf).
min_expression (Union[int, float], optional) – Minimum expression level to include in the plot. Defaults to 0.
xlabel (Optional[str], optional) – Label for the x-axis. Defaults to None.
fit_reg (bool, optional) – Whether to fit a regression line. Defaults to False.
lowess (bool, optional) – Whether to use LOWESS for regression. Defaults to False.
robust (bool, optional) – Whether to use a robust regression. Defaults to False.
fig_height (Number, optional) – Height of the figure. Defaults to 4.
fig_marginal_ratio (Number, optional) – Ratio of the marginal plot height to the main plot height. Defaults to 0.2.
scatter_size (Number, optional) – Size of the scatter plot points. Defaults to 1.
- Returns:
Displays the plot.
- Return type:
None