pairot.pl.mapping#
- pairot.pl.mapping(data, width=None, height=None, zmin=None, zmax=None, colormap='Greens', sort_by_score=True, backend='plotly')#
Plot cluster mappings from
pairot.tl.DatasetMap.compute_mapping.- Parameters:
data (
DataFrame) – pd.DataFrame containing the cluster mapping scores.width (
int(default:None)) – Width of the plot in pixels.height (
int(default:None)) – Height of the plot in pixels.zmin (
float(default:None)) – Minimum value for color scale.zmax (
float(default:None)) – Maximum value for color scale.colormap (
str(default:'Greens')) – Colormap to use for the heatmap.sort_by_score (
bool(default:True)) – Whether to sort the clusters by their maximum mapping score. If True, the strongest map for each cell type cluster appears on the diagonal of the mapping plot.backend (
Literal['plotly','matplotlib'] (default:'plotly')) – Backend to use for plotting. Options are ‘plotly’ and ‘matplotlib’. The plotly backend allows for interactive plots, while the matplotlib backend is suitable for static plots.
Examples
>>> import pairot as pr >>> >>> # Get cluster mappings between query and reference dataset >>> mapping = dataset_map.compute_mapping() >>> >>> # Plot the cluster mapping heatmap >>> pr.pl.mapping(data)