arrow_axis#
- arrow_axis(*, plot: PlotSpec | None = None, size: float = 1, length: float = 0.25, angle: float = 10, color: str = '#3f3f3f', **arrow_kwargs) DeferredLayer#
Layer of arrows as the X and Y axis to the plot.
- Parameters:
plot (
PlotSpec | None, defaultNone) – If provided, the arrow axis is built from this plot’s data and aesthetics regardless of which plot the resulting layer is added to. WhenNone, the layer is deferred and introspects the plot it is added to via+.size (
float) – Size of the arrow.color (
str) – Color of the arrow.angle (
float) – Angle of the arrow head in degrees.length (
float) – Length of the arrow head (px).**arrow_kwargs – Additional parameters for the arrow layer. For more information on arrow parameters, see: https://lets-plot.org/python/pages/api/lets_plot.arrow.html
- Returns:
DeferredLayer
Examples
Without arrow.
import scanpy as sc from lets_plot import * import cellestial as cl data = sc.read_h5ad("data/pbmc3k_pped.h5ad") umap = cl.umap(data,"HBA2") umap
Adding the arrow axis.
import scanpy as sc from lets_plot import * import cellestial as cl data = sc.read_h5ad("data/pbmc3k_pped.h5ad") umap = cl.umap(data,"HBA2") umap + cl.arrow_axis()
Arrow customization.
import scanpy as sc from lets_plot import * import cellestial as cl data = sc.read_h5ad("data/pbmc3k_pped.h5ad") umap = cl.umap(data,"HBA2") umap + cl.arrow_axis(length=0.20,color="dark_violet")