Api Reference

/

Marks and Components

Marks and Components

These tables are generated from XY's public Python signatures and docstrings. Use the Components guides for composition patterns, then return here for exact parameter names, types, and defaults.

Marks

Marks accept arrays directly or resolve column names through mark-level or chart-level data=. The hist() convenience wrapper accepts the same parameters and produces the same histogram mark as histogram().

xy.line

A line series with automatic M4 decimation for large inputs.

Props

PropTypeDescription
xUnion[str, ArrayLike, None]

X values or a column name resolved from ``data``.

yUnion[str, ArrayLike, None]

Y values or a column name resolved from ``data``.

dataTableLike

Table used to resolve column-name inputs.

nameOptional[str]

Series label used by legends and tooltips.

colorOptional[str]

Line color.

widthfloat

Line width in pixels.

opacityfloat

Line opacity from zero to one.

curvestr

Interpolation mode, such as ``linear`` or ``smooth``.

dashUnion[str, Sequence[float], None]

Optional line dash pattern.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

keyAny

Stable row identities, or a column name resolved from ``data``.

animationAnimation | bool | None

Per-mark animation override; ``False`` disables animation.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.scatter

A scatter series with optional color, size, and density encodings.

Props

PropTypeDescription
xUnion[str, ArrayLike, None]

X values or a column name resolved from ``data``.

yUnion[str, ArrayLike, None]

Y values or a column name resolved from ``data``.

dataTableLike

Table used to resolve column-name inputs.

colorUnion[str, ColorLike, ArrayLike, None]

Constant color, values, or a column name.

sizeUnion[str, Scalar, ArrayLike, None]

Constant marker size, values, or a column name.

nameOptional[str]

Series label used by legends and tooltips.

colormapstr

Colormap used for continuous color values.

color_domainOptional[tuple[float, float]]

Explicit minimum and maximum for continuous colors.

size_rangetuple[float, float]

Minimum and maximum rendered marker sizes.

opacityAny

Marker opacity from zero to one.

zoom_size_factorfloat

Marker-size multiplier reached on deep zoom.

zoom_opacityOptional[float]

Optional marker opacity reached on deep zoom.

zoom_emphasisfloat

Zoom factor at which responsive targets are reached.

densityOptional[bool]

Whether to force or disable density aggregation.

symbolAny

Marker symbol name.

strokeAny

Optional marker outline color.

stroke_widthAny

Marker outline width in pixels.

_artist_alphaAny

Internal Matplotlib alpha override, scalar or per marker.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

keyAny

Stable row identities, or a column name resolved from ``data``.

animationAnimation | bool | None

Per-mark animation override; ``False`` disables animation.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.area

A filled area series between ``y`` and ``base``.

Props

PropTypeDescription
xUnion[str, ArrayLike, None]

X values or a column name resolved from ``data``.

yUnion[str, ArrayLike, None]

Y values or a column name resolved from ``data``.

dataTableLike

Table used to resolve column-name inputs.

baseUnion[str, Scalar, ArrayLike]

Baseline value, values, or a column name.

nameOptional[str]

Series label used by legends and tooltips.

colorOptional[str]

Area fill color.

opacityfloat

Fill opacity from zero to one.

line_colorOptional[str]

Outline color.

line_widthfloat

Outline width in pixels.

line_opacityfloat

Outline opacity from zero to one.

stroke_perimeterbool

Whether to stroke the complete area perimeter.

fillUnion[str, dict[str, str], None]

CSS fill value or linear gradient.

curvestr

Interpolation mode, such as ``linear`` or ``smooth``.

dashUnion[str, Sequence[float], None]

Optional outline dash pattern.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

keyAny

Stable row identities, or a column name resolved from ``data``.

animationAnimation | bool | None

Per-mark animation override; ``False`` disables animation.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.bar

A bar series supporting grouped, stacked, and normalized modes.

Props

PropTypeDescription
xUnion[str, ArrayLike, None]

Category positions or a column name resolved from ``data``.

yUnion[str, ArrayLike, None]

Bar values, series matrix, or a column name.

dataTableLike

Table used to resolve column-name inputs.

nameOptional[str]

Series label used by legends and tooltips.

colorAny

Constant color, values, or a column name.

colorsOptional[list[str]]

Colors assigned to multiple series.

widthfloat

Bar width in category units.

baseUnion[str, Scalar, ArrayLike]

Baseline value, values, or a column name.

modestr

``grouped``, ``stacked``, or ``normalized`` layout.

orientationstr

``vertical`` or ``horizontal`` orientation.

seriesOptional[list[str]]

Optional names for matrix-valued series.

opacityAny

Bar opacity from zero to one.

corner_radiusAny

Bar corner radius in pixels.

strokeAny

Optional bar outline color.

stroke_widthAny

Bar outline width in pixels.

_artist_alphaAny

Internal Matplotlib alpha override, scalar or per bar.

fillUnion[str, dict[str, str], None]

CSS fill value or linear gradient.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

keyAny

Stable row identities, or a column name resolved from ``data``.

animationAnimation | bool | None

Per-mark animation override; ``False`` disables animation.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.column

Create a vertical column series using the shared bar renderer.

Props

PropTypeDescription
xUnion[str, ArrayLike, None]

Category positions or a column name resolved from ``data``.

yUnion[str, ArrayLike, None]

Column values, series matrix, or a column name.

dataTableLike

Table used to resolve column-name inputs.

nameOptional[str]

Series label used by legends and tooltips.

colorUnion[str, Sequence[str], None]

Constant color, values, or a column name.

colorsOptional[list[str]]

Colors assigned to multiple series.

widthfloat

Column width in category units.

baseUnion[str, Scalar, ArrayLike]

Baseline value, values, or a column name.

modestr

``grouped``, ``stacked``, or ``normalized`` layout.

orientationstr

Orientation forwarded to the bar renderer.

seriesOptional[list[str]]

Optional names for matrix-valued series.

opacityfloat

Column opacity from zero to one.

corner_radiusUnion[float, tuple[float, float]]

Column corner radius in pixels.

strokeOptional[str]

Optional column outline color.

stroke_widthfloat

Column outline width in pixels.

fillUnion[str, dict[str, str], None]

CSS fill value or linear gradient.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

keyAny

Stable row identities, or a column name resolved from ``data``.

animationAnimation | bool | None

Per-mark animation override; ``False`` disables animation.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.histogram

A one-dimensional histogram.

Props

PropTypeDescription
valuesUnion[str, ArrayLike, None]

Sample values or a column name resolved from ``data``.

dataTableLike

Table used to resolve column-name inputs.

binsUnion[int, str, ArrayLike]

Bin count, edges, or automatic binning strategy.

rangeOptional[tuple[float, float]]

Explicit minimum and maximum input values.

densitybool

Whether to normalize bin areas to one.

cumulativebool

Whether bins contain cumulative counts.

nameOptional[str]

Series label used by legends and tooltips.

colorAny

Bar color.

opacityAny

Bar opacity from zero to one.

corner_radiusAny

Bar corner radius in pixels.

strokeAny

Optional bar outline color.

stroke_widthAny

Bar outline width in pixels.

_artist_alphaAny

Internal Matplotlib alpha override, scalar or per bin.

fillUnion[str, dict[str, str], None]

CSS fill value or linear gradient.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.box

Grouped Tukey box plots from 1-D or column-oriented 2-D values.

Props

PropTypeDescription
valuesUnion[str, ArrayLike, None]

Sample values or a column name resolved from ``data``.

dataTableLike

Table used to resolve column-name inputs.

xUnion[str, ArrayLike, None]

Optional group positions or a column name.

groupUnion[str, ArrayLike, None]

Optional grouping values or a column name.

nameOptional[str]

Series label used by legends and tooltips.

colorOptional[str]

Box color.

widthfloat

Box width in category units.

opacityfloat

Box opacity from zero to one.

orientationstr

``vertical`` or ``horizontal`` orientation.

show_outliersbool

Whether to render outlier points.

outlier_sizefloat

Outlier marker size in pixels.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.violin

Grouped bounded-resolution violin distributions.

Props

PropTypeDescription
valuesUnion[str, ArrayLike, None]

Sample values or a column name resolved from ``data``.

dataTableLike

Table used to resolve column-name inputs.

xUnion[str, ArrayLike, None]

Optional group positions or a column name.

groupUnion[str, ArrayLike, None]

Optional grouping values or a column name.

nameOptional[str]

Series label used by legends and tooltips.

colorOptional[str]

Violin color.

widthfloat

Violin width in category units.

binsint

Density resolution.

opacityfloat

Violin opacity from zero to one.

orientationstr

``vertical`` or ``horizontal`` orientation.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.ecdf

An empirical cumulative distribution function.

Props

PropTypeDescription
valuesUnion[str, ArrayLike, None]

Sample values or a column name resolved from ``data``.

dataTableLike

Table used to resolve column-name inputs.

binsOptional[int]

Optional bounded number of evaluation bins.

nameOptional[str]

Series label used by legends and tooltips.

colorOptional[str]

Line color.

widthfloat

Line width in pixels.

opacityfloat

Line opacity from zero to one.

dashUnion[str, Sequence[float], None]

Optional line dash pattern.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.heatmap

A rectangular heatmap from a two-dimensional matrix.

Props

PropTypeDescription
zUnion[str, ArrayLike, None]

Two-dimensional values or a column name resolved from ``data``.

xUnion[str, ArrayLike, None]

Optional x coordinates or a column name.

yUnion[str, ArrayLike, None]

Optional y coordinates or a column name.

dataTableLike

Table used to resolve column-name inputs.

nameOptional[str]

Series label used by legends and tooltips.

colormapstr

Colormap used for cell values.

domainOptional[tuple[float, float]]

Explicit minimum and maximum for the color scale.

opacityfloat

Cell opacity from zero to one.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.hexbin

A native-kernel binned hexagonal density plot.

Props

PropTypeDescription
xUnion[str, ArrayLike, None]

X values or a column name resolved from ``data``.

yUnion[str, ArrayLike, None]

Y values or a column name resolved from ``data``.

dataTableLike

Table used to resolve column-name inputs.

gridsizeint | tuple[int, int]

Horizontal and optional vertical bin counts.

rangeOptional[tuple[tuple[float, float], tuple[float, float]]]

Explicit x and y input ranges.

binsstr

Bin normalization mode.

CUnion[str, ArrayLike, None]

Optional values aggregated within each hexagon.

reduce_C_functionCallable[[np.ndarray], Scalar]

Reduction applied to values in each hexagon.

mincntOptional[int]

Minimum observations required to render a hexagon.

nameOptional[str]

Series label used by legends and tooltips.

colormapstr

Colormap used for bin values.

opacityfloat

Hexagon opacity from zero to one.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.contour

Regular-grid isolines, optionally with a filled density surface.

Props

PropTypeDescription
zUnion[str, ArrayLike, None]

Two-dimensional scalar grid or a column name.

xUnion[str, ArrayLike, None]

Optional x coordinates or a column name.

yUnion[str, ArrayLike, None]

Optional y coordinates or a column name.

dataTableLike

Table used to resolve column-name inputs.

levelsUnion[int, ArrayLike]

Number or explicit values of contour levels.

filledbool

Whether to fill intervals between contours.

nameOptional[str]

Series label used by legends and tooltips.

colormapstr

Colormap used for contour values.

colorOptional[str]

Constant isoline color.

widthfloat

Isoline width in pixels.

opacityfloat

Contour opacity from zero to one.

dash_negativebool

Whether negative isolines use a dashed stroke.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.errorbar

Vertical and/or horizontal uncertainty bars.

Props

PropTypeDescription
xUnion[str, ArrayLike, None]

X values or a column name resolved from ``data``.

yUnion[str, ArrayLike, None]

Y values or a column name resolved from ``data``.

dataTableLike

Table used to resolve column-name inputs.

yerrUnion[str, Scalar, ArrayLike, None]

Symmetric or asymmetric vertical error values.

xerrUnion[str, Scalar, ArrayLike, None]

Symmetric or asymmetric horizontal error values.

nameOptional[str]

Series label used by legends and tooltips.

colorOptional[str]

Error-bar color.

widthfloat

Stroke width in pixels.

cap_sizeOptional[float]

Optional cap length in pixels.

opacityfloat

Stroke opacity from zero to one.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

keyAny

Stable row identities, or a column name resolved from ``data``.

animationAnimation | bool | None

Per-mark animation override; ``False`` disables animation.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.error_band

A confidence or error band between lower and upper series.

Props

PropTypeDescription
xUnion[str, ArrayLike, None]

X values or a column name resolved from ``data``.

lowerUnion[str, ArrayLike, None]

Lower-bound values or a column name.

upperUnion[str, ArrayLike, None]

Upper-bound values or a column name.

dataTableLike

Table used to resolve column-name inputs.

nameOptional[str]

Series label used by legends and tooltips.

colorOptional[str]

Band color.

opacityfloat

Band opacity from zero to one.

line_widthfloat

Boundary-line width in pixels.

line_opacityfloat

Boundary-line opacity from zero to one.

fillUnion[str, dict[str, str], None]

CSS fill value or linear gradient.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

keyAny

Stable row identities, or a column name resolved from ``data``.

animationAnimation | bool | None

Per-mark animation override; ``False`` disables animation.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.step

A stepped line series.

Props

PropTypeDescription
xUnion[str, ArrayLike, None]

X values or a column name resolved from ``data``.

yUnion[str, ArrayLike, None]

Y values or a column name resolved from ``data``.

dataTableLike

Table used to resolve column-name inputs.

wherestr

Position of each step transition.

nameOptional[str]

Series label used by legends and tooltips.

colorOptional[str]

Line color.

widthfloat

Line width in pixels.

opacityfloat

Line opacity from zero to one.

dashUnion[str, Sequence[float], None]

Optional line dash pattern.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.stairs

A precomputed stairs series from values and bin edges.

Props

PropTypeDescription
valuesUnion[str, ArrayLike, None]

Step heights or a column name resolved from ``data``.

edgesUnion[str, ArrayLike, None]

Bin-edge values or a column name.

dataTableLike

Table used to resolve column-name inputs.

wherestr

Position of each step transition.

nameOptional[str]

Series label used by legends and tooltips.

colorOptional[str]

Line color.

widthfloat

Line width in pixels.

opacityfloat

Line opacity from zero to one.

dashUnion[str, Sequence[float], None]

Optional line dash pattern.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.stem

A stem plot with optional point markers.

Props

PropTypeDescription
xUnion[str, ArrayLike, None]

X values or a column name resolved from ``data``.

yUnion[str, ArrayLike, None]

Y values or a column name resolved from ``data``.

dataTableLike

Table used to resolve column-name inputs.

baseUnion[str, Scalar, ArrayLike]

Baseline value, values, or a column name.

nameOptional[str]

Series label used by legends and tooltips.

colorOptional[str]

Stem and marker color.

widthfloat

Stem width in pixels.

opacityfloat

Mark opacity from zero to one.

markerbool

Whether to draw a marker at each stem endpoint.

marker_sizefloat

Marker size in pixels.

symbolstr

Marker symbol name.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.segments

Independent line segments rendered as one instanced mark.

Props

PropTypeDescription
x0Union[str, ArrayLike, None]

Starting x coordinates or a column name.

y0Union[str, ArrayLike, None]

Starting y coordinates or a column name.

x1Union[str, ArrayLike, None]

Ending x coordinates or a column name.

y1Union[str, ArrayLike, None]

Ending y coordinates or a column name.

dataTableLike

Table used to resolve column-name inputs.

nameOptional[str]

Series label used by legends and tooltips.

colorUnion[str, ColorLike, ArrayLike, None]

Constant color, values, or a column name.

colormapstr

Colormap used for continuous color values.

domainOptional[tuple[float, float]]

Explicit minimum and maximum for continuous colors.

widthAny

Segment width in pixels.

opacityAny

Segment opacity from zero to one.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

xy.triangle_mesh

Filled triangle mesh with constant or per-triangle color values.

Props

PropTypeDescription
x0Union[str, ArrayLike, None]

First-vertex x coordinates or a column name.

y0Union[str, ArrayLike, None]

First-vertex y coordinates or a column name.

x1Union[str, ArrayLike, None]

Second-vertex x coordinates or a column name.

y1Union[str, ArrayLike, None]

Second-vertex y coordinates or a column name.

x2Union[str, ArrayLike, None]

Third-vertex x coordinates or a column name.

y2Union[str, ArrayLike, None]

Third-vertex y coordinates or a column name.

dataTableLike

Table used to resolve column-name inputs.

colorUnion[str, ColorLike, ArrayLike, None]

Constant color, values, or a column name.

colormapstr

Colormap used for continuous color values.

domainOptional[tuple[float, float]]

Explicit minimum and maximum for continuous colors.

nameOptional[str]

Series label used by legends and tooltips.

opacityAny

Triangle opacity from zero to one.

strokeAny

Optional triangle outline color.

stroke_widthAny

Triangle outline width in pixels.

styleOptional[dict[str, StyleValue]]

Mark style overrides.

class_nameOptional[str]

Adapter-only trace metadata; it does not style canvas geometry.

x_axisstr

Identifier of the x axis used by this mark.

y_axisstr

Identifier of the y axis used by this mark.

Axes and Annotations

Axes configure scale presentation and named coordinate systems. Annotations add rules, bands, text, markers, arrows, thresholds, and callouts. threshold and threshold_zone are annotation conveniences, not data marks.

xy.x_axis

Configure an x axis.

Props

PropTypeDescription
idstr

Axis identifier referenced by marks.

labelOptional[str]

Axis label.

label_positionOptional[AxisLabelPosition]

Named or structured label placement.

label_offsetOptional[float]

Label offset in pixels.

label_angleOptional[float]

Label rotation in degrees.

type_Optional[str]

Scale type, such as ``linear``, ``time``, ``log``, or ``symlog``.

constantOptional[float]

Width of the linear region around zero for ``symlog``.

domainOptional[tuple[float, float]]

Explicit minimum and maximum scale values.

boundsUnion[tuple[float, float], Literal['data'], None]

Hard navigation limits, or ``"data"`` to use the data range. Pan and zoom are clamped within these limits; ``None`` leaves navigation unrestricted.

reversebool

Whether to reverse the scale direction.

formatOptional[str]

Tick-label format string.

tick_countOptional[int]

Requested number of ticks.

tick_valuesUnion[Sequence[float], np.ndarray, None]

Explicit tick positions.

tick_labelsOptional[Sequence[str]]

Labels corresponding to explicit tick positions.

tick_label_angleOptional[float]

Tick-label rotation in degrees.

tick_label_strategyOptional[AxisTickLabelStrategy]

Collision-handling strategy for tick labels.

tick_label_anchorOptional[str]

Which edge of a tick label pins to its tick — ``"start"``, ``"center"`` (default), or ``"end"`` (matplotlib's ``ha`` values ``"left"``/``"right"`` are accepted as aliases). With ``tick_label_angle``, the label rotates about the pinned edge, so an end-anchored slanted label hangs entirely below a bottom axis instead of seesawing around its midpoint.

tick_label_min_gapOptional[float]

Minimum gap between tick labels in pixels.

sideOptional[str]

Side of the plot where the axis is drawn.

styleOptional[dict[str, StyleValue]]

Axis style overrides.

xy.y_axis

Configure a y axis.

Props

PropTypeDescription
idstr

Axis identifier referenced by marks.

labelOptional[str]

Axis label.

label_positionOptional[AxisLabelPosition]

Named or structured label placement.

label_offsetOptional[float]

Label offset in pixels.

label_angleOptional[float]

Label rotation in degrees.

type_Optional[str]

Scale type, such as ``linear``, ``time``, ``log``, or ``symlog``.

constantOptional[float]

Width of the linear region around zero for ``symlog``.

domainOptional[tuple[float, float]]

Explicit minimum and maximum scale values.

boundsUnion[tuple[float, float], Literal['data'], None]

Hard navigation limits, or ``"data"`` to use the data range. Pan and zoom are clamped within these limits; ``None`` leaves navigation unrestricted.

reversebool

Whether to reverse the scale direction.

formatOptional[str]

Tick-label format string.

tick_countOptional[int]

Requested number of ticks.

tick_valuesUnion[Sequence[float], np.ndarray, None]

Explicit tick positions.

tick_labelsOptional[Sequence[str]]

Labels corresponding to explicit tick positions.

tick_label_angleOptional[float]

Tick-label rotation in degrees.

tick_label_strategyOptional[AxisTickLabelStrategy]

Collision-handling strategy for tick labels.

tick_label_anchorOptional[str]

Which edge of a tick label pins to its tick — ``"start"``, ``"center"``, or ``"end"`` (matplotlib's ``ha`` values ``"left"``/``"right"`` are accepted as aliases). Unset defaults to the tick-side edge: ``"end"`` for a left-side axis, ``"start"`` for a right-side one. With ``tick_label_angle``, the label rotates about the pinned edge.

tick_label_min_gapOptional[float]

Minimum gap between tick labels in pixels.

sideOptional[str]

Side of the plot where the axis is drawn.

styleOptional[dict[str, StyleValue]]

Axis style overrides.

xy.vline

A vertical rule annotation at an x coordinate or x-axis category.

Props

PropTypeDescription
xCoordinateLike

X coordinate or category where the rule is drawn.

textOptional[str]

Optional label displayed beside the rule.

colorOptional[str]

Rule color.

widthfloat

Rule width in pixels.

opacityfloat

Rule opacity from zero to one.

class_nameOptional[str]

DOM class name applied to the annotation.

styleOptional[dict[str, StyleValue]]

Annotation style overrides.

xy.hline

A horizontal rule annotation at a y coordinate or y-axis category.

Props

PropTypeDescription
yCoordinateLike

Y coordinate or category where the rule is drawn.

textOptional[str]

Optional label displayed beside the rule.

colorOptional[str]

Rule color.

widthfloat

Rule width in pixels.

opacityfloat

Rule opacity from zero to one.

class_nameOptional[str]

DOM class name applied to the annotation.

styleOptional[dict[str, StyleValue]]

Annotation style overrides.

xy.x_band

A vertical span annotation between two x coordinates or categories.

Props

PropTypeDescription
x0CoordinateLike

Starting x coordinate or category.

x1CoordinateLike

Ending x coordinate or category.

textOptional[str]

Optional label displayed in the band.

colorOptional[str]

Band color.

opacityfloat

Band opacity from zero to one.

class_nameOptional[str]

DOM class name applied to the annotation.

styleOptional[dict[str, StyleValue]]

Annotation style overrides.

xy.y_band

A horizontal span annotation between two y coordinates or categories.

Props

PropTypeDescription
y0CoordinateLike

Starting y coordinate or category.

y1CoordinateLike

Ending y coordinate or category.

textOptional[str]

Optional label displayed in the band.

colorOptional[str]

Band color.

opacityfloat

Band opacity from zero to one.

class_nameOptional[str]

DOM class name applied to the annotation.

styleOptional[dict[str, StyleValue]]

Annotation style overrides.

xy.threshold

A semantic threshold rule on the x or y axis.

Props

PropTypeDescription
valueCoordinateLike

Coordinate or category where the threshold is drawn.

axisstr

Axis receiving the threshold, ``x`` or ``y``.

textOptional[str]

Optional threshold label.

colorOptional[str]

Rule color.

widthfloat

Rule width in pixels.

opacityfloat

Rule opacity from zero to one.

class_nameOptional[str]

DOM class name applied to the annotation.

styleOptional[dict[str, StyleValue]]

Annotation style overrides.

xy.threshold_zone

A semantic threshold band on the x or y axis.

Props

PropTypeDescription
startCoordinateLike

Starting coordinate or category.

endCoordinateLike

Ending coordinate or category.

axisstr

Axis receiving the band, ``x`` or ``y``.

textOptional[str]

Optional threshold label.

colorOptional[str]

Band color.

opacityfloat

Band opacity from zero to one.

class_nameOptional[str]

DOM class name applied to the annotation.

styleOptional[dict[str, StyleValue]]

Annotation style overrides.

xy.text

A text annotation anchored at an x/y coordinate or category.

Props

PropTypeDescription
xCoordinateLike

Anchor x coordinate or category.

yCoordinateLike

Anchor y coordinate or category.

valuestr

Text to display.

dxfloat

Horizontal pixel offset from the anchor.

dyfloat

Vertical pixel offset from the anchor.

colorOptional[str]

Text color.

anchorstr

Text alignment relative to the anchor point.

class_nameOptional[str]

DOM class name applied to the annotation.

styleOptional[dict[str, StyleValue]]

Annotation style overrides.

xy.label

Create a positioned text label.

Props

PropTypeDescription
xCoordinateLike

Anchor x coordinate or category.

yCoordinateLike

Anchor y coordinate or category.

valuestr

Text to display.

dxfloat

Horizontal pixel offset from the anchor.

dyfloat

Vertical pixel offset from the anchor.

colorOptional[str]

Text color.

anchorstr

Text alignment relative to the anchor point.

class_nameOptional[str]

DOM class name applied to the annotation.

styleOptional[dict[str, StyleValue]]

Annotation style overrides.

xy.marker

A point marker annotation with an optional label.

Props

PropTypeDescription
xCoordinateLike

Marker x coordinate or category.

yCoordinateLike

Marker y coordinate or category.

textOptional[str]

Optional marker label.

colorOptional[str]

Marker fill color.

sizefloat

Marker size in pixels.

symbolstr

Marker symbol name.

stroke_colorOptional[str]

Marker outline color.

stroke_widthfloat

Marker outline width in pixels.

opacityfloat

Marker opacity from zero to one.

dxfloat

Horizontal label offset in pixels.

dyfloat

Vertical label offset in pixels.

anchorstr

Label alignment relative to the marker.

class_nameOptional[str]

DOM class name applied to the annotation.

styleOptional[dict[str, StyleValue]]

Annotation style overrides.

xy.arrow

An arrow annotation from one data coordinate to another.

Props

PropTypeDescription
x0CoordinateLike

Starting x coordinate or category.

y0CoordinateLike

Starting y coordinate or category.

x1CoordinateLike

Ending x coordinate or category.

y1CoordinateLike

Ending y coordinate or category.

textOptional[str]

Optional arrow label.

colorOptional[str]

Arrow color.

widthfloat

Arrow width in pixels.

opacityfloat

Arrow opacity from zero to one.

class_nameOptional[str]

DOM class name applied to the annotation.

styleOptional[dict[str, StyleValue]]

Annotation style overrides.

xy.callout

A text callout offset from a data coordinate with a pointer arrow.

Props

PropTypeDescription
xCoordinateLike

Anchor x coordinate or category.

yCoordinateLike

Anchor y coordinate or category.

valuestr

Callout text.

dxfloat

Horizontal pixel offset from the anchor.

dyfloat

Vertical pixel offset from the anchor.

colorOptional[str]

Callout color.

widthfloat

Pointer width in pixels.

opacityfloat

Callout opacity from zero to one.

anchorstr

Text alignment relative to the callout point.

class_nameOptional[str]

DOM class name applied to the annotation.

styleOptional[dict[str, StyleValue]]

Annotation style overrides.

Chrome and Behavior

Chrome components configure legends, tooltips, inferred colorbars, the modebar, theme tokens, and interaction behavior. colorbar() derives its domain and colormap from the last supported continuous mark, while title, ticks, and orientation control its presentation.

xy.legend

Configure chart legend chrome.

Props

PropTypeDescription
*childrenAny

Optional opaque replacement content.

showbool

Whether to display the legend.

locOptional[str]

Legend placement within or around the plot.

ncolsint

Number of legend columns.

titleOptional[str]

Optional legend title.

highlightbool

Whether hovering a legend entry emphasizes its series by dimming the others (live client only; exports are static).

togglebool

Whether clicking a legend entry hides/shows its series or category (live client only; exports are static).

renderAny

Opaque renderer supplied by an adapter.

class_nameOptional[str]

DOM class name applied to the legend.

styleOptional[dict[str, StyleValue]]

Legend style overrides.

xy.tooltip

Configure chart tooltip chrome.

Props

PropTypeDescription
*childrenAny

Optional opaque replacement content.

showbool

Whether to display tooltips.

renderAny

Opaque renderer supplied by an adapter.

fieldsOptional[list[str]]

Data fields shown in each tooltip.

titleOptional[str]

Optional tooltip title.

formatOptional[dict[str, str]]

Per-field value formats.

class_nameOptional[str]

DOM class name applied to the tooltip.

styleOptional[dict[str, StyleValue]]

Tooltip style overrides.

xy.colorbar

Configure color-scale chrome.

Props

PropTypeDescription
*childrenAny

Optional opaque replacement content.

showbool

Whether to display the colorbar.

renderAny

Opaque renderer supplied by an adapter.

titleOptional[str]

Optional colorbar title. By default XY uses the color field or mark name when one is available.

orientationstr

``vertical`` or ``horizontal`` placement.

ticksOptional[list[float]]

Optional finite numeric tick positions.

class_nameOptional[str]

DOM class name applied to the colorbar.

styleOptional[dict[str, StyleValue]]

Colorbar style overrides.

xy.modebar

Configure interactive chart controls.

Props

PropTypeDescription
showbool

Whether to display the modebar.

class_nameOptional[str]

DOM class name applied to the modebar.

styleOptional[dict[str, StyleValue]]

Modebar style overrides.

button_class_nameOptional[str]

DOM class name applied to each button.

button_styleOptional[dict[str, StyleValue]]

Style overrides applied to each button.

xy.theme

Configure chart theme tokens.

Props

PropTypeDescription
styleOptional[dict[str, StyleValue]]

Base chart style overrides.

backgroundOptional[StyleValue]

Figure background color — paints the whole chart card including margins, title, and tick labels (matplotlib's ``figure.facecolor``). The plot rect shows through unless ``plot_background`` sets it separately.

plot_backgroundOptional[StyleValue]

Plot-area background color — the data rect only (matplotlib's ``axes.facecolor``).

grid_colorOptional[StyleValue]

Grid-line color.

axis_colorOptional[StyleValue]

Axis-line and tick color.

text_colorOptional[StyleValue]

Default chart text color.

crosshair_colorOptional[StyleValue]

Hover crosshair color.

selection_colorOptional[StyleValue]

Selection-outline color.

selection_fillOptional[StyleValue]

Selection-region fill color.

**tokensStyleValue

Additional supported theme tokens.

xy.interaction_config

Configure browser interaction chrome and event emission.

Props

PropTypeDescription
hoverOptional[bool]

Whether pointer movement emits hover events.

clickOptional[bool]

Whether picked marks emit click events.

selectOptional[bool]

Whether shift-drag box selection is enabled.

brushOptional[bool]

Whether brush selection is enabled.

crosshairOptional[bool]

Whether plot-aligned hover guides are shown.

navigationOptional[bool]

Whether pointer drag and wheel gestures pan or zoom the chart.

panOptional[bool]

Whether plain-drag pan is enabled. ``False`` ignores plain-drag pan gestures and contains every zoom-enabled axis to its home window. The default keeps panning enabled.

pan_axesOptional[tuple[str, ...]]

Concrete declared axis IDs pan gestures translate freely. The default includes every declared axis. An excluded axis that zoom can still navigate is contained: its window slides inside the axis's home extents (plain drag keeps working on a zoomed-in view) but never extends past them, on any mutation path.

zoomOptional[bool]

Whether viewport zoom is enabled. ``False`` ignores wheel and box zoom, double-click reset, and modebar zoom controls. The default keeps zooming enabled.

default_drag_actionOptional[DefaultDragAction]

Initial action performed by a plain plot drag. ``"auto"`` is the default and chooses pan first; ``"zoom"`` draws a rectangle and zooms to its bounds. Selection actions make their corresponding gesture the default without requiring Shift. The modebar can change the active action without changing this configured default.

zoom_axesOptional[tuple[str, ...]]

Axis dimensions changed by wheel, modebar, and box zoom. Use ``("x",)`` for x-only zoom. Secondary IDs such as ``"y2"`` are independent. The default includes every declared axis.

zoom_limitsOptional[ZoomLimits]

Minimum and maximum magnification relative to the home range, either one pair for all zoom axes or a mapping by axis ID. Missing configuration defaults to ``(1.0, None)`` per zoom axis.

wheel_zoomOptional[bool]

Whether wheel and trackpad zoom is available.

box_zoomOptional[bool]

Whether box zoom is available as a drag action.

zoom_buttonsOptional[bool]

Whether toolbar Zoom In/Out commands are available.

double_click_resetOptional[bool]

Whether double-click restores ``reset_axes``.

reset_axesOptional[tuple[str, ...]]

Concrete declared axis IDs restored by reset. The default is the union of enabled pan and zoom axes.

link_groupOptional[str]

Identifier used to synchronize charts in the browser.

link_axesOptional[tuple[str, ...]]

Axes synchronized within the link group.

historyOptional[bool]

Whether the client keeps a view-history stack with modebar Back/Forward buttons. Enabled by default; ``False`` removes the buttons and stops snapshotting.

xy.animation

Configure entrance and data-update motion without per-frame callbacks.

Props

PropTypeDescription
enabledbool | Literal['auto']

``"auto"`` honors reduced motion; a boolean explicitly enables or disables.

delayfloat

Non-negative delay before motion begins, in milliseconds.

durationfloat

Non-negative animation duration, in milliseconds.

easingstr | tuple[float, float, float, float] | Spring

Named easing, four-number cubic Bézier tuple, or ``spring()`` policy.

matchLiteral['index', 'append', 'key']

Row identity strategy: ``"index"``, ``"append"``, or ``"key"``.

enterstr

Entrance effect, such as ``"auto"``, ``"scale"``, or ``"reveal"``.

updatestr

Update effect; use ``"interpolate"`` or ``"none"``.

interpolateSequence[str]

Unique channels to interpolate during updates.

on_startOptional[Callable[[dict], None]]

Optional live-host callback receiving the animation-start event.

on_endOptional[Callable[[dict], None]]

Optional live-host callback receiving the animation-end event.

xy.spring

Build a serializable spring easing policy.

Props

PropTypeDescription
stiffnessfloat

Spring stiffness; larger values respond more quickly.

dampingfloat

Resistance that settles the spring and limits overshoot.

massfloat

Spring mass; larger values respond more slowly.

For rendering boundaries, see Marks, Colorbars, and Modebars and interaction controls.

Built with Reflex