get_figure#
API pages include interactive (HTML) plots that would possibly not render correctly on a mobile device.
- get_figure(grid: SupPlotsSpec, index: int) PlotSpec#
Get a single figure from a grid (SupPlotsSpec) by index.
- Parameters:
grid (
SupPlotsSpec) – The grid to pull a figure from.index (
int) – The index of the figure to return. Negative indices are supported.
- Returns:
PlotSpec– The selected figure.- Raises:
TypeError – If grid is not a SupPlotsSpec or index is not an int.
IndexError – If index is out of range for the grid.
Examples
Get a single plot from a grid.
import scanpy as sc from lets_plot import * import cellestial as cl data = cl.datasets.pbmc3k(cache_directory="data") grid = cl.expressions( data, keys=["MALAT1", "YBX3", "MNDA" ,"HLA-DRA"], axis_type="arrow", color_high="red", ncol=2, ) cl.get_figure(grid, index=3)