Skip to main content

XY-shaped probability field shown as a binned scatter chart.

CI CodSpeed Python 3.11+ Docs

XY is an actively evolving, early-alpha Python charting library for large, interactive datasets. Its Rust core and WebGL2 renderer keep work bounded by what the screen can show; find guides, API reference, and examples in the documentation.

Highlights

  • Built for large data. Reduces long lines and dense scatters to what the screen can show, and brings detail back as you zoom.
  • Declarative interface. Compose marks and guides, or use the familiar xy.pyplot.
  • Interactive by default. Pan, zoom, hover, select, and inspect exact source rows.
  • One chart, many outputs. Use notebooks or export HTML, raster, and vector formats.
  • Built for apps. Embed responsive charts and style them with CSS or Tailwind.

Is XY for me?

XY is a great fit for teams that want to explore large 2D datasets in Python, share interactive notebook results, or ship self-contained charts on the web. Build charts once, then display them in notebooks and apps or export them as HTML, images, and vector graphics.

Benchmarks

Cold-render time for a 10-million-point chart in XY, Matplotlib, and Plotly. Lower is better.

In the recorded 10-million-point baseline, XY produced a static PNG in 0.023 s versus 2.8 s for Matplotlib and 9.6 s for Plotly, and reached first interactive render 16–20× sooner.

The committed launch baseline uses identical seeded data, a 900×420 output, and three isolated cold runs. See the launch report and benchmark runbook for the environment, methodology, and raw results.

Installation

pip install xy

# or, with uv
uv add xy

Published wheels contain the Python package, JavaScript client, and native Rust core. End users do not need Rust, Node, npm, or a CDN.

In Pyodide 314:

First load micropip in the Pyodide JavaScript runtime:

await pyodide.loadPackage("micropip");
import micropip

await micropip.install("xy")

Getting started

Create a small business chart:

import xy

months = [1, 2, 3, 4, 5, 6]
revenue = [42, 45, 48, 51, 55, 59]
pipeline = [35, 38, 42, 40, 46, 50]

chart = xy.line_chart(
    xy.line(months, revenue, name="revenue", color="#2563eb"),
    xy.line(months, pipeline, name="pipeline", color="#16a34a"),
    xy.x_axis(label="month"),
    xy.y_axis(label="USD thousands"),
    xy.legend(),
    title="Revenue vs pipeline",
)
# chart.to_html("chart.html")
# chart.to_png("chart.png")
# chart.to_svg("chart.svg")
chart

The same chart can be exported without changing how it is built.

XY currently includes line, scatter, area, histogram, bar and column, heatmap, error bar and band, box, violin, ECDF, hexbin, contour, step, stairs, stem, triangle mesh, and faceted charts. See the copyable examples for the complete surface.

Coming from matplotlib

For common pyplot workflows, change the import and keep the plotting code:

import numpy as np
import xy.pyplot as plt

x = np.linspace(0, 10, 200)
fig, ax = plt.subplots()
ax.plot(x, np.sin(x), "r--", label="signal")
ax.legend()
plt.show()

The shim intentionally covers common plotting workflows rather than every matplotlib feature. See the compatibility guide.

Styling

Customize marks and chart chrome with Python, CSS, or Tailwind. See the styling guide.

chart = xy.line_chart(
    xy.line(x, y, color="#7c3aed", width=3),
    class_name="rounded-xl bg-white",
    class_names={"tooltip": "rounded-lg bg-zinc-900 text-white"},
)

Embed XY in a Reflex app

With the reflex-xy adapter, any XY chart becomes a regular Reflex component. Place it inside cards, grids, tabs, or dashboards with no JavaScript, iframe, or separate chart service.

Register the adapter once:

# rxconfig.py
import reflex as rx
import reflex_xy

config = rx.Config(
    app_name="dashboard",
    plugins=[reflex_xy.XYPlugin()],
)

Then add a chart anywhere in the component tree:

import reflex as rx
import reflex_xy
import xy

signups = xy.line_chart(
    xy.line([1, 2, 3, 4, 5], [120, 180, 165, 240, 310]),
    title="Weekly signups",
)


def index() -> rx.Component:
    return rx.card(
        rx.heading("Growth"),
        reflex_xy.chart(signups, height="320px"),
        width="100%",
    )


app = rx.App()
app.add_page(index)

The chart keeps its built-in hover, pan, and zoom behavior. For charts driven by Reflex state, events, or live streams, see the Reflex integration guide and the runnable example app.

How it works

Most chart stacks serialize every value as JSON and ask the browser to draw every mark. XY instead keeps exact values in a ColumnStore, computes an appropriate level of detail in Rust, and transfers typed binary buffers. Decimated and density views are bounded by the visible result.

flowchart TB
    API["Python API<br/>Build the chart"]
    STORE["ColumnStore<br/>Keep canonical f64 columns"]
    CORE["Native Rust compute<br/>Direct · decimated · density"]
    PAYLOAD["Compact payload<br/>Data-less JSON spec + typed binary buffers"]
    RENDER["Browser or notebook<br/>WebGL2 marks · Canvas axes · DOM interface"]

    API --> STORE --> CORE --> PAYLOAD --> RENDER

This is why zooming matters: a dense overview can use aggregation, while a narrow view can return to exact points. With a live host, pan and zoom can request a refined payload. Canonical f64 data stays in Python so hover and selection can still return original rows.

For the full design, see the design dossier.

What you can build today

  • Declarative 2D charts with marks, axes, annotations, legends, tooltips, and CSS/Tailwind-friendly styling hooks.
  • Interactive notebook and application views with pan, zoom, hover, and selection.
  • Self-contained HTML and browser-free PNG, JPEG, WebP, SVG, and PDF exports from the same chart object.
  • Large-data views that adapt from direct rendering to decimated and density representations as the visible range changes.

Documentation

Start with the XY documentation for installation, the chart gallery, guides, and API reference. The repository also includes copyable API examples, benchmark details, and the changelog.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xy-0.0.3.tar.gz (2.4 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

xy-0.0.3-py3-none-win_arm64.whl (1.1 MB view details)

Uploaded Python 3Windows ARM64

xy-0.0.3-py3-none-win_amd64.whl (1.2 MB view details)

Uploaded Python 3Windows x86-64

xy-0.0.3-py3-none-win32.whl (1.2 MB view details)

Uploaded Python 3Windows x86

xy-0.0.3-py3-none-pyemscripten_2026_0_wasm32.whl (939.3 kB view details)

Uploaded PyEmscripten 2026.0 wasm32Python 3

xy-0.0.3-py3-none-musllinux_1_2_x86_64.whl (1.3 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

xy-0.0.3-py3-none-musllinux_1_2_armv7l.whl (1.2 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARMv7l

xy-0.0.3-py3-none-musllinux_1_2_aarch64.whl (1.2 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

xy-0.0.3-py3-none-manylinux_2_17_x86_64.whl (1.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

xy-0.0.3-py3-none-manylinux_2_17_armv7l.whl (1.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

xy-0.0.3-py3-none-manylinux_2_17_aarch64.whl (1.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

xy-0.0.3-py3-none-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

xy-0.0.3-py3-none-macosx_10_12_x86_64.whl (1.3 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file xy-0.0.3.tar.gz.

File metadata

  • Download URL: xy-0.0.3.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for xy-0.0.3.tar.gz
Algorithm Hash digest
SHA256 27f5e6260f1877cfb0f118abe76f834ef990ceed95e67771c58737afee00510b
MD5 fd853a9ed38beff81a1cd7fa5a0928f9
BLAKE2b-256 4f7c6445652c776bcc7fc16ea9cfa9f9604b3e13deceaedea42863f2cb1d58d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.3.tar.gz:

Publisher: release.yml on reflex-dev/xy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xy-0.0.3-py3-none-win_arm64.whl.

File metadata

  • Download URL: xy-0.0.3-py3-none-win_arm64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for xy-0.0.3-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 d0732489b2e9ed62161a6965c2d75d725aaa1867c110c7e119d45edf699e8a5d
MD5 edf12771a2233218112f8fcae038ee4f
BLAKE2b-256 57a54939727c455b4d9498f6fbefb126d402cce072419f00509b2717c1c25eda

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.3-py3-none-win_arm64.whl:

Publisher: release.yml on reflex-dev/xy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xy-0.0.3-py3-none-win_amd64.whl.

File metadata

  • Download URL: xy-0.0.3-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for xy-0.0.3-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 1c4d300557708fb2dde71267f8a26d97a856a8bad708193498fef40d2a7e3039
MD5 be1b4bda60526fc62920a7b218002771
BLAKE2b-256 676060189b9e41358590cc140de0c9110705bb6484ce077dc03226986c440ac7

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.3-py3-none-win_amd64.whl:

Publisher: release.yml on reflex-dev/xy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xy-0.0.3-py3-none-win32.whl.

File metadata

  • Download URL: xy-0.0.3-py3-none-win32.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for xy-0.0.3-py3-none-win32.whl
Algorithm Hash digest
SHA256 fe2f6d97d6485f0b199d67496710dda70afccb93942838168801b20407edb7de
MD5 2db281ff4cf91b239be64edaff42906e
BLAKE2b-256 ed8043da9120af8fab988a9b3add795511fa88aee8283f94bc1af27a99abd63d

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.3-py3-none-win32.whl:

Publisher: release.yml on reflex-dev/xy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xy-0.0.3-py3-none-pyemscripten_2026_0_wasm32.whl.

File metadata

File hashes

Hashes for xy-0.0.3-py3-none-pyemscripten_2026_0_wasm32.whl
Algorithm Hash digest
SHA256 cbd9730a88f78a8115053e3c7dae99c6b893ff483bc0f61896e11979cc04d7b6
MD5 b0610cac269400e31267f66bbd2a22d4
BLAKE2b-256 0f85c47421d792ee8d7a0291fc5f35c26ac578943e40178fc8629e2ca9c5d0e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.3-py3-none-pyemscripten_2026_0_wasm32.whl:

Publisher: release.yml on reflex-dev/xy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xy-0.0.3-py3-none-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: xy-0.0.3-py3-none-musllinux_1_2_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3, musllinux: musl 1.2+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for xy-0.0.3-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 df6992620476fd1273d10a0f46ff05cfa2b089e24c2cdf108fa2c1c2c9c35636
MD5 4dd3bb96aa354ed654af6807a7a31968
BLAKE2b-256 68c43df3b452ff01096145c45c214ef6d68059ccbb95b49ab85dc4490ad82484

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.3-py3-none-musllinux_1_2_x86_64.whl:

Publisher: release.yml on reflex-dev/xy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xy-0.0.3-py3-none-musllinux_1_2_armv7l.whl.

File metadata

  • Download URL: xy-0.0.3-py3-none-musllinux_1_2_armv7l.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3, musllinux: musl 1.2+ ARMv7l
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for xy-0.0.3-py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 07114927b4b6797cba3ce1969437fc25e5dd9203c761cdb12ba75cac29aee148
MD5 a130210578d474e86958dd60cbc69988
BLAKE2b-256 bbb83904f1550919eeedebc510d2d31874a7e158a3e53da6f18393940d82b7be

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.3-py3-none-musllinux_1_2_armv7l.whl:

Publisher: release.yml on reflex-dev/xy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xy-0.0.3-py3-none-musllinux_1_2_aarch64.whl.

File metadata

  • Download URL: xy-0.0.3-py3-none-musllinux_1_2_aarch64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3, musllinux: musl 1.2+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for xy-0.0.3-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 0038d8636cb5a4b750a4c0f8ebd2e94e95b832dbe093cd0398425590d81ee67a
MD5 9d70ee94c634fdc4a0583a96f0021537
BLAKE2b-256 bcbfe84f6ba25d5105c8bb439f393fe315ae6efd9958104fdcfe4333c3ad6299

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.3-py3-none-musllinux_1_2_aarch64.whl:

Publisher: release.yml on reflex-dev/xy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xy-0.0.3-py3-none-manylinux_2_17_x86_64.whl.

File metadata

  • Download URL: xy-0.0.3-py3-none-manylinux_2_17_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for xy-0.0.3-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 ab38acd6bf8fddd17d63ed1c184d224ab555f22114c339920b8d9400abd975e4
MD5 ce91c43e5d1b4c26b4e26bd8e8f84254
BLAKE2b-256 3cf930bb8a3ad509839d3e12bd5f94a22844f765a91f304fa06d0a8f3e3b7dc5

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.3-py3-none-manylinux_2_17_x86_64.whl:

Publisher: release.yml on reflex-dev/xy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xy-0.0.3-py3-none-manylinux_2_17_armv7l.whl.

File metadata

  • Download URL: xy-0.0.3-py3-none-manylinux_2_17_armv7l.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARMv7l
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for xy-0.0.3-py3-none-manylinux_2_17_armv7l.whl
Algorithm Hash digest
SHA256 018c8dfbaf02895ac1fd2a3b937163841022475eb94a597685ba6bdc2e3ecfb5
MD5 d16ef6d3e9b0418180af6a7d419c6aca
BLAKE2b-256 6a36b85fbe82a6194b060e116621d3cd2c828ca1ead857285e408db3a37ed0ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.3-py3-none-manylinux_2_17_armv7l.whl:

Publisher: release.yml on reflex-dev/xy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xy-0.0.3-py3-none-manylinux_2_17_aarch64.whl.

File metadata

  • Download URL: xy-0.0.3-py3-none-manylinux_2_17_aarch64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for xy-0.0.3-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 cd7642fd1f73354c91bde9643f6bd0be645188e393e78b841dbfe8e0ac0ee1ca
MD5 92272191f4981d6cd7eea8788707a90a
BLAKE2b-256 d23d0263d1088b5df2f763157c58229ad6e9a77900335a301a30ee221da8f293

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.3-py3-none-manylinux_2_17_aarch64.whl:

Publisher: release.yml on reflex-dev/xy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xy-0.0.3-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: xy-0.0.3-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for xy-0.0.3-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 14f105fc0d351e134b5f06f441e029db9cece7c9cb7821c7e17b490faf210b45
MD5 3321b5129c84e5518e6d5a8dcb4cff24
BLAKE2b-256 786a1ea6f256a8ca15bb56efd67385a77715b43c51a5e6f250435d0cf03dd251

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.3-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on reflex-dev/xy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xy-0.0.3-py3-none-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: xy-0.0.3-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for xy-0.0.3-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 52b4cd376471b2d8ef2597f0965ccc87aa64a68631eaadfe6fb3afe3f31dde54
MD5 aa2f1253bb2dcfc3930c0233a80ac639
BLAKE2b-256 0b0344403829e3220b7ee4a0a3e73d53613661177c1ce37cae160d824a278532

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.3-py3-none-macosx_10_12_x86_64.whl:

Publisher: release.yml on reflex-dev/xy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page