get_mapping#
- get_mapping(plot: PlotSpec, *, index: int = 0) dict#
Returns the mapping of the plot as a dict.
- Parameters:
plot (
PlotSpec) – The plot to get mapping from.index (
int, default0) – index of the layer to get the local mapping from.
- Returns:
dict– The combined mapping of the plot as a dict.
Examples
Get the mapping of a plot.
import scanpy as sc from lets_plot import * import cellestial as cl data = sc.read_h5ad("data/pbmc3k_pped.h5ad") umap = cl.umap(data,key="CD14",axis_type="arrow",color_high="red") cl.get_mapping(umap)
{'x': 'X_UMAP1', 'y': 'X_UMAP2', 'color': 'CD14'}