get_mapping#

API pages include interactive (HTML) plots that would possibly not render correctly on a mobile device.

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, default 0) – 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 = cl.datasets.pbmc3k(cache_directory="data")
umap = cl.umap(data,key="CD14",axis_type="arrow",color_high="red")

cl.get_mapping(umap)
{'x': 'X_UMAP1', 'y': 'X_UMAP2', 'color': 'CD14'}