Skip to content

scdef.pl.scale

scale(model: scDEF, scale_type: Literal['cell', 'gene'], figsize: Tuple[float, float] = (4, 4), alpha: float = 0.6, fontsize: int = 12, legend_fontsize: int = 10, ax: Optional[Axes] = None, show: bool = True) -> Optional[Axes]

Plot learned scale factors vs observed scales.

Parameters:

Name Type Description Default
model scDEF

scDEF model instance

required
scale_type Literal['cell', 'gene']

type of scale to plot, either "cell" or "gene"

required
figsize Tuple[float, float]

figure size

(4, 4)
alpha float

transparency level

0.6
fontsize int

font size for labels

12
legend_fontsize int

font size for legend

10
ax Optional[Axes]

matplotlib axes to plot on

None
show bool

whether to show the plot

True

Returns:

Type Description
Optional[Axes]

Axes object if show is False, None otherwise