multivelo.dynamic_plot
- multivelo.dynamic_plot(adata, genes, by='expression', color_by='state', gene_time=True, axis_on=True, frame_on=True, show_anchors=True, show_switches=True, downsample=1, full_range=False, figsize=None, pointsize=2, linewidth=1.5, cmap='coolwarm')
Gene dynamics plot.
This function plots accessibility, expression, or velocity by time.
- Parameters:
adata (
AnnData) – Anndata result from dynamics recovery.genes (str, list of str) – List of genes to plot.
by (str (default: expression)) – Plot accessibilities and expressions if expression. Plot velocities if velocity.
color_by (str (default: state)) – Color by the four potential states if state. Other common values are leiden, louvain, celltype, etc. If not state, the color field must be present in .uns, which can be pre-computed with scanpy.pl.scatter. For state, red, orange, green, and blue represent state 1, 2, 3, and 4, respectively.
gene_time (bool (default: True)) – Whether to use individual gene fitted time, or shared global latent time. Mean values of 20 equal sized windows will be connected and shown if gene_time==False.
axis_on (bool (default: True)) – Whether to show axis labels.
frame_on (bool (default: True)) – Whether to show plot frames.
show_anchors (bool (default: True)) – Whether to display anchors.
show_switches (bool (default: True)) – Whether to show switch times. The switch times are indicated by vertical dotted line.
downsample (int (default: 1)) – How much to downsample the cells. The remaining number will be 1/downsample of original.
full_range (bool (default: False)) – Whether to show the full time range of velocities before smoothing or subset to only smoothed range.
figsize (tuple (default: None)) – Total figure size.
pointsize (float (default: 2)) – Point size for scatter plots.
linewidth (float (default: 1.5)) – Line width for anchor line or mean line.
cmap (str (default: coolwarm)) – Color map for continuous color key.