dynamo.pl.cell_wise_vectors_3d(adata, basis='umap', x=0, y=1, z=2, ekey=None, vkey='velocity_S', X=None, V=None, color=None, layer='X', background='white', ncols=4, figsize=(6, 4), ax=None, inverse=False, cell_inds='all', vector='velocity', save_show_or_return='show', save_kwargs={}, quiver_3d_kwargs={'arrow_length_ratio': 5, 'cmap': <matplotlib.colors.LinearSegmentedColormap object>, 'length': 2, 'linewidth': 5, 'norm': <matplotlib.colors.Normalize object>, 'zorder': 3}, grid_color=None, axis_label_prefix=None, axis_labels=None, elev=None, azim=None, alpha=None, show_magnitude=False, titles=None, **cell_wise_kwargs)[source]

Plot the velocity or acceleration vector of each cell.

  • %(scatters.parameters.no_show_legend|kwargs|save_kwargs)s

  • ekey (str (default: “M_s”)) – The expression key

  • vkey (str (default: “velocity_S”)) – The velocity key

  • inverse (bool (default: False)) – Whether to inverse the direction of the velocity vectors.

  • cell_inds (str or list (default: all)) – the cell index that will be chosen to draw velocity vectors. Can be a list of integers (cell indices) or str (Cell names).

  • quiver_size (float or None (default: None)) – The size of quiver. If None, we will use set quiver_size to be 1. Note that quiver quiver_size is used to calculate the head_width (10 x quiver_size), head_length (12 x quiver_size) and headaxislength (8 x quiver_size) of the quiver. This is done via the default_quiver_args function which also calculate the scale of the quiver (1 / quiver_length).

  • quiver_length (float or None (default: None)) – The length of quiver. The quiver length which will be used to calculate scale of quiver. Note that befoe applying default_quiver_args velocity values are first rescaled via the quiver_autoscaler function. Scale of quiver indicates the nuumber of data units per arrow length unit, e.g., m/s per plot width; a smaller scale parameter makes the arrow longer.

  • vector (str (default: velocity)) – Which vector type will be used for plotting, one of {‘velocity’, ‘acceleration’} or either velocity field or acceleration field will be plotted.

  • frontier (bool (default: False)) – Whether to add the frontier. Scatter plots can be enhanced by using transparency (alpha) in order to show area of high density and multiple scatter plots can be used to delineate a frontier. See matplotlib tips & tricks cheatsheet (https://github.com/matplotlib/cheatsheets). Originally inspired by figures from scEU-seq paper: https://science.sciencemag.org/content/367/6482/1151.

  • save_kwargs (dict (default: {})) – A dictionary that will passed to the save_fig function. By default it is an empty dictionary and the save_fig function will use the {“path”: None, “prefix”: ‘cell_wise_velocity’, “dpi”: None, “ext”: ‘pdf’, “transparent”: True, “close”: True, “verbose”: True} as its parameters. Otherwise you can provide a dictionary that properly modify those keys according to your needs.

  • s_kwargs_dict (dict (default: {})) – The dictionary of the scatter arguments.

  • cell_wise_kwargs – Additional parameters that will be passed to plt.quiver function

Return type

Nothing but a cell wise quiver plot.