c2v.pl.embedding_axis

Contents

c2v.pl.embedding_axis#

c2v.pl.embedding_axis(axes, x_offset=0.0, y_offset=0.0, length=0.15, arrow_width=0.0001, head_width=0.02, color='black', label='UMAP', label1=None, label2=None, font_size=10.0)#

Adds two perpendicular arrows (L-shape) to the bottom-left corner of the plot to mimic standard single-cell embedding visualizations (Seurat/Scanpy).

Parameters:#

axesmatplotlib.axes.Axes | list[matplotlib.axes.Axes]

The axes object to draw on (e.g., fig.axes[0]).

x_offsetfloat, optional

Distance from left edge (0.0 to 1.0). Default 5%.

y_offsetfloat, optional

Distance from bottom edge (0.0 to 1.0). Default 5%.

lengthfloat, optional

Length of the arrows as a fraction of the axes size. Default 15%.

arrow_widthfloat, optional

Width of the arrow shaft. Default 0.0001.

head_widthfloat, optional

Width of the arrow head. Default 0.02.

colorstr, optional

Color of arrows and text. Default “black”.

labelstr, optional

Label for the horizontal and vertical arrows. Default “UMAP”.

label1str, optional

Label for the horizontal arrow. If None, label + “ 1” is used. Default None.

label2str, optional

Label for the vertical arrow. If None, label + “ 2” is used. Default None.

font_sizeint, optional

Size of the text labels. Default 10.

Parameters:
axes Axes | list[Axes]

x_offset float

y_offset float

length float

arrow_width float

head_width float

color str

label str

label1 str | None

label2 str | None

font_size int