voyagerpy.plotting.plot.plot_single_barcode_data#
- voyagerpy.plotting.plot.plot_single_barcode_data(adata: AnnData, y: int | str, x: int | str | None = None, obsm: str | None = None, cmap: str | None = None, ax: Axes | None = None, legend: bool = False, color_by: str | None = None, x_label: str | None = None, y_label: str | None = None, **kwargs) Axes#
Plot barcode data on a single axis.
- Parameters:
adata (AnnData) – The annotated data matrix.
y (Union[int, str]) – The column name for the data to show on the y-axis.
x (Union[int, str, None], optional) – The column name for the data to show on the x-axis, by default None.
obsm (Optional[str], optional) – The obsm to use. If None, use adata.obs, by default None.
cmap (Optional[str], optional) – The colormap to use, by default None
ax (Optional[Axes], optional) – The axis to draw on, by default None. If None, create a new figure and axis.
legend (bool, optional) – Whether to draw a legend, by default False.
color_by (Optional[str], optional) – The column name to color by, by default None.
x_label (Optional[str], optional) – The label to show on the x-axis, by default None. If None, use x.
y_label (Optional[str], optional) – The label to show on the y-axis, by default None. If None, use y.
**kwargs –
Keyword arguments to pass to the corresponding plotting function, which is one of
-
scatter(). -simple_violinplot(). -grouped_violinplot().
- Returns:
The axis containing the plot.
- Return type:
Axes
- Raises:
NotImplementedError – If y is categorical and x is None.
NotImplementedError – If y and x are both categorical.
Note
If y is categorical and x is continuous, a horizontal grouped violinplot is drawn. If y and x are both continuous, a scatterplot is drawn. If y is continuous and x is categorical, a grouped violinplot is drawn. If y is continuous and x is None, a simple violinplot is drawn.
See also
simple_violinplot(),grouped_violinplot(),scatter(),plot_barcode_data()