pyVIA.plotting_via.via_streamplot
- pyVIA.plotting_via.via_streamplot(via_object, embedding=None, density_grid=0.5, arrow_size=0.7, arrow_color='k', color_dict=None, arrow_style='-|>', max_length=4, linewidth=1, min_mass=1, cutoff_perc=5, scatter_size=500, scatter_alpha=0.5, marker_edgewidth=0.1, density_stream=2, smooth_transition=1, smooth_grid=0.5, color_scheme='annotation', add_outline_clusters=False, cluster_outline_edgewidth=0.001, gp_color='white', bg_color='black', dpi=300, title='Streamplot', b_bias=20, n_neighbors_velocity_grid=None, labels=None, use_sequentially_augmented=False, cmap='rainbow', show_text_labels=True)[source]
Construct vector streamplot on the embedding to show a fine-grained view of inferred directions in the trajectory
- Parameters:
via_object –
embedding (
ndarray
) – np.ndarray of shape (n_samples, 2) umap or other 2-d embedding on which to project the directionality of cellsdensity_grid (
float
) –arrow_size (
float
) –arrow_color (
str
) –arrow_style –
max_length (
int
) –linewidth (
float
) – width of lines in streamplot, default = 1min_mass –
cutoff_perc (
int
) –scatter_size (
int
) – size of scatter points default =500scatter_alpha (
float
) – transpsarency of scatter pointsmarker_edgewidth (
float
) – width of outline arround each scatter point, default = 0.1density_stream (
int
) –smooth_transition (
int
) –smooth_grid (
float
) –color_scheme (
str
) – str, default = ‘annotation’ corresponds to self.true_labels. Other options are ‘time’ (uses single-cell pseudotime) and ‘cluster’ (via cluster graph) and ‘other’. Alternatively provide labels as a listadd_outline_clusters (
bool
) –cluster_outline_edgewidth –
gp_color –
bg_color –
dpi –
title –
b_bias – default = 20. higher value makes the forward bias of pseudotime stronger
n_neighbors_velocity_grid –
labels (
list
) – list (will be used for the color scheme) or if a color_dict is provided these labels should matchuse_sequentially_augmented –
cmap (
str
) –
- Returns:
fig, ax