sccloud.embedding

sccloud.embedding(adata, basis, keys=None, cmap='viridis', alpha=1, size=12, width=400, height=400, sort=True, cols=2, use_raw=None, nbins=-1, reduce_function=<function mean>, labels_on_data=False, tooltips=None, **kwds)[source]

Generate an embedding plot.

Parameters
  • adata (AnnData) – Annotated data matrix.

  • keys (Union[None, str, List[str], Tuple[str]]) – Key for accessing variables of adata.var_names or a field of adata.obs used to color the plot. Can also use count to plot cell count when binning.

  • basis (str) – String in adata.obsm containing coordinates.

  • alpha (float) – Points alpha value.

  • size (int) – Point pixel size.

  • sort (bool) – Plot higher values on top of lower values.

  • cmap (Union[str, List[str], Tuple[str]]) – Color map name (hv.plotting.list_cmaps()) or a list of hex colors. See http://holoviews.org/user_guide/Styling_Plots.html for more information.

  • nbins (int) – Number of bins used to summarize plot on a grid. Useful for large datasets. Negative one means automatically bin the plot.

  • reduce_function (Callable[[<built-in function array>], float]) – Function used to summarize overlapping cells if nbins is specified.

  • cols (int) – Number of columns for laying out multiple plots

  • width (int) – Plot width.

  • height (int) – Plot height.

  • tooltips (Union[str, List[str], Tuple[str], None]) – List of additional fields to show on hover.

  • labels_on_data (bool) – Whether to draw labels for categorical features on the plot.

  • use_raw (Optional[bool]) – Use raw attribute of adata if present.

Return type

Element