pegasus.embedding¶
-
pegasus.
embedding
(adata, basis, keys=None, cmap=None, palette=None, alpha=1, size=None, width=400, height=400, sort=True, cols=None, use_raw=None, nbins=-1, reduce_function=<function amax>, brush_categorical=False, legend='right', tooltips=None, legend_font_size=None, opacity_min=0, opacity_max=1, **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 (
Union
[str
,List
[str
],Tuple
[str
]]) – String in adata.obsm containing coordinates.alpha (
float
) – Points alpha value.size (
Optional
[float
]) – Point pixel size.sort (
bool
) – Plot higher values on top of lower values. Disable for linked brushing.brush_categorical (
bool
) – Enable linked brushing on categorical variables (disables categorical legend).cmap (
Union
[str
,List
[str
],Tuple
[str
],None
]) – Color map for continous variables.palette (
Union
[str
,List
[str
],Tuple
[str
],None
]) – Color map for categorical variables.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
[[array
],float
]) – Function used to summarize overlapping cells if nbins is specified.cols (
Optional
[int
]) – Number of columns for laying out multiple plotswidth (
int
) – Plot width.height (
int
) – Plot height.tooltips (
Union
[str
,List
[str
],Tuple
[str
],None
]) – List of additional fields to show on hover.legend (
str
) – `top’, ‘bottom’, ‘left’, ‘right’, or ‘data’ to draw labels for categorical features on the plot.legend_font_size (
Union
[int
,str
,None
]) – Font size for labels_on_datause_raw (
Optional
[bool
]) – Use raw attribute of adata if present.opacity_min (
float
) – Minimum value for encoding categorical data purity when binning using opacity.opacity_max (
float
) – Maximum value for encoding categorical data purity when binning using opacity.
- Return type
Element