arrow_axis#

API pages include interactive (HTML) plots that would possibly not render correctly on a mobile device.

arrow_axis(*, size: float = 1, length: float = 0.25, angle: float = 10, color: str = '#3f3f3f', linetype: int | str | None = None, arrow_kwargs: dict | None = None) → FeatureSpec#

Theme with arrows as the X and Y axis of the plot.

Parameters:
  • size (float) – Width of the axis lines.

  • color (str) – Color of the arrow.

  • angle (float) – Angle of the arrow head in degrees.

  • length (float) – Span of each axis line as a fraction of the panel (0.25 covers 25%).

  • linetype (int | str | None, default None) – Line type of the axis lines, by number or name. E.g “dashed”.

  • arrow_kwargs (dict | None, default None) – Additional parameters for arrow. E.g {“type”: “closed”}.

Returns:

FeatureSpec – Theme feature specification.

Notes

Uses ggrust arrow axes: element_line(arrow=…, extent=…) on the axis lines.

Examples

Without arrow.

import scanpy as sc
from ggrust import *

import cellestial as cl

data = cl.datasets.pbmc3k()

umap = cl.umap(data,"HBA2")
umap
UMAP1 UMAP2 HBA2 0 2 4 6

Adding the arrow axis.

import scanpy as sc
from ggrust import *

import cellestial as cl

data = cl.datasets.pbmc3k()

umap = cl.umap(data,"HBA2")
umap + cl.arrow_axis()
UMAP1 UMAP2 HBA2 0 2 4 6

Arrow customization.

import scanpy as sc
from ggrust import *

import cellestial as cl

data = cl.datasets.pbmc3k()

umap = cl.umap(data,"HBA2")
umap + cl.arrow_axis(length=0.20,color="dark_violet")
UMAP1 UMAP2 HBA2 0 2 4 6