plotnine.geoms.annotate

class plotnine.geoms.annotate(geom: str | type[geom_base_class], x: float | None = None, y: float | None = None, xmin: float | None = None, xmax: float | None = None, xend: float | None = None, xintercept: float | None = None, ymin: float | None = None, ymax: float | None = None, yend: float | None = None, yintercept: float | None = None, **kwargs: Any)[source]

Create an annotation layer

Parameters:
geomgeom or str

geom to use for annotation, or name of geom (e.g. 'point').

xfloat

Position

yfloat

Position

xminfloat

Position

yminfloat

Position

xmaxfloat

Position

ymaxfloat

Position

xendfloat

Position

yendfloat

Position

xinterceptfloat

Position

yinterceptfloat

Position

kwargsdict

Other aesthetics or parameters to the geom.

Notes

The positioning aethetics x, y, xmin, ymin, xmax, ymax, xend, yend, xintercept, yintercept depend on which geom is used.

You should choose or ignore accordingly.

All geoms are created with stat='identity'.