scdef.pl.layers_obs ¶
layers_obs(model: scDEF, obs_keys: Union[str, List[str]], obs_mats: Dict[str, Dict[int, ndarray]], obs_clusters: Dict[str, ndarray], obs_vals_dict: Dict[str, List[str]], sort_layer_factors: bool = True, orders: Optional[List[ndarray]] = None, layers: Optional[List[int]] = None, vmax: Optional[float] = None, vmin: Optional[float] = None, cb_title: str = '', cb_title_fontsize: int = 10, fontsize: int = 12, title_fontsize: int = 12, pad: float = 0.1, shrink: float = 0.7, figsize: Tuple[float, float] = (10, 4), xticks_rotation: float = 90.0, cmap: Optional[str] = None, show: bool = True, rasterized: bool = False, **kwargs: Any) -> None
Plot observation matrices across layers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
scDEF
|
scDEF model instance |
required |
obs_keys
|
Union[str, List[str]]
|
observation keys to plot |
required |
obs_mats
|
Dict[str, Dict[int, ndarray]]
|
observation matrices dictionary |
required |
sort_layer_factors
|
bool
|
whether to sort factors by layer |
True
|
orders
|
Optional[List[ndarray]]
|
custom factor orders |
None
|
layers
|
Optional[List[int]]
|
which layers to plot |
None
|
vmax
|
Optional[float]
|
maximum value for colormap |
None
|
vmin
|
Optional[float]
|
minimum value for colormap |
None
|
cb_title
|
str
|
colorbar title |
''
|
cb_title_fontsize
|
int
|
colorbar title font size |
10
|
fontsize
|
int
|
font size for labels |
12
|
title_fontsize
|
int
|
title font size |
12
|
pad
|
float
|
padding for colorbar |
0.1
|
shrink
|
float
|
shrink factor for colorbar |
0.7
|
figsize
|
Tuple[float, float]
|
figure size |
(10, 4)
|
xticks_rotation
|
float
|
rotation angle for x-axis ticks |
90.0
|
cmap
|
Optional[str]
|
colormap name |
None
|
show
|
bool
|
whether to show the plot |
True
|
rasterized
|
bool
|
whether to rasterize the plot |
False
|
**kwargs
|
Any
|
additional plotting keyword arguments |
{}
|