import cellestial as cl
import scanpy as sc
from lets_plot import *
LetsPlot.setup_html()
= sc.read("data/pbmc3k_mini.h5ad") data
12 boxplots
12.1 Instead of a single key, boxplots
expects a list (iterable) of keys.
12.1.1 it will split the plot into ncol
columns
cl.boxplots(
data,
["n_genes_by_counts",
"pct_counts_in_top_100_genes",
"log1p_total_counts_mt",
"pct_counts_hb",
],=2,
ncol="sample",
fill=False,
show_points=[scale_y_log10()],
layers )
12.2 Merge multiple plots into a single plot
You can simply set multi_panel=False
to merge multiple plots into a single plot.
It is not suggested to use this option if the plots have extremely different scales.
cl.boxplots(
data,
["n_genes_by_counts",
"pct_counts_in_top_100_genes",
"log1p_total_counts_mt",
"pct_counts_hb",
],=2,
ncol='sample',
fill=False,
show_points=["leiden"],
add_tooltips=[scale_y_log10()],
layers=False,
multi_panel="width",
scale+ggsize(800,600) )
cl.versions()
cellestial: 0.6.0
scanpy: 1.10.4
anndata: 0.11.3
polars: 1.12.0