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.

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.2.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.2-py3-none-win_arm64.whl (1.1 MB view details)

Uploaded Python 3Windows ARM64

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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3Windows x86

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

Uploaded Python 3musllinux: musl 1.2+ x86-64

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

Uploaded Python 3musllinux: musl 1.2+ ARMv7l

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

Uploaded Python 3musllinux: musl 1.2+ ARM64

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

Uploaded Python 3manylinux: glibc 2.17+ x86-64

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

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

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

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

xy-0.0.2-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.2.tar.gz.

File metadata

  • Download URL: xy-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 54dda795690a68b978f455a1add84e55731d178dbf562dea449ec7a3b3dbf698
MD5 4c7f2020e37185b5c811b1d58c47ef45
BLAKE2b-256 ae76c404c80941961646deac83f29b0acd045c2ac97293a03c2f7fb8ec954a6c

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.2.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.2-py3-none-win_arm64.whl.

File metadata

  • Download URL: xy-0.0.2-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.2-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 3ba816beea4a4a32b3aabfe26b78a1a5eaec8aeb877c4a2f438f914be84b8112
MD5 0acf7b5e8b52620b6741540c7163bbc6
BLAKE2b-256 dd63e844ffbdc1312500e2d0f444b6f7d614a43e9c394396220bbe8a7c6ed5c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.2-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.2-py3-none-win_amd64.whl.

File metadata

  • Download URL: xy-0.0.2-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.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 15bc1b2fe0c77eeae7d62b154c1673f7ee786529f78c0b1721e459024f333433
MD5 d36cfba3250ea012e93bcc79a7b8d68a
BLAKE2b-256 5946ea6d4b3f28ecd118d7196dd29c766aae868a07203789ddff8a73b6fe1b27

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.2-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.2-py3-none-win32.whl.

File metadata

  • Download URL: xy-0.0.2-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.2-py3-none-win32.whl
Algorithm Hash digest
SHA256 ff4342401263dd092c247364790bb581811c86f1a9a91efc61c77cd83f72f354
MD5 20bd7daa7d30d6821c5f00839600195b
BLAKE2b-256 c7825adbedd2ad3041f905e4c4a50795ac99d46e2195417ad0e31edcba46ae3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.2-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.2-py3-none-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: xy-0.0.2-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.2-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0703553d6992ac1cc14bf49ccc5539cd1c82602bf71a3bbb23b3c5ed6a8b2647
MD5 76c4609267aae89cb26ce3a0442fb0ba
BLAKE2b-256 d26bc72c295cb62187c0842b715c6860ab1ff5ad947df7cd4052f76a889960e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.2-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.2-py3-none-musllinux_1_2_armv7l.whl.

File metadata

  • Download URL: xy-0.0.2-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.2-py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 84b0eb8d00269b2d9d98c61edd86d419ce01c3cc2858656e99fecc360a24f21b
MD5 0d678ec4bf73d0fb7f89e0459cf5532e
BLAKE2b-256 8a0d82c3dbf5585052a45e6a82af8c96ce8eac37a36de0d0c380a5b8253577c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.2-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.2-py3-none-musllinux_1_2_aarch64.whl.

File metadata

  • Download URL: xy-0.0.2-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.2-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 1d085462871e52ca9d43834c34472dfcc08b4151c66822fe388799e4fe53691d
MD5 d7d2c21643562cd076ca6c8b190274eb
BLAKE2b-256 1473fb1669cfb12273024e8c9beb3090238a5e852a600454fd198613ec47e139

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.2-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.2-py3-none-manylinux_2_17_x86_64.whl.

File metadata

  • Download URL: xy-0.0.2-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.2-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 d068c22c740de89e2891f24c6c0d8b90f2596c559db0d22a7c0ded4a2d745ced
MD5 7ea56dc2f4482c0c5c9e5a951d061800
BLAKE2b-256 818c2e3a2ca08eb42c530c5e0e0c8e086e32690c861ae92e6337f73df9381dd9

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.2-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.2-py3-none-manylinux_2_17_armv7l.whl.

File metadata

  • Download URL: xy-0.0.2-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.2-py3-none-manylinux_2_17_armv7l.whl
Algorithm Hash digest
SHA256 41ff41fab8c4784be62829d0acaa19f438d02cf3658caa4d61871728d12c0d58
MD5 d900a0e8fd36b0f0efb10754b18f59bc
BLAKE2b-256 e44fa68f98b8eeec1f0ae46a98e64d07d1c936f3c15626bbfd5af619c86a30ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.2-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.2-py3-none-manylinux_2_17_aarch64.whl.

File metadata

  • Download URL: xy-0.0.2-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.2-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 73d31e93d3f994f6e49e1e27336872944cdd0a0230a49b7ecd97f0cc9457938b
MD5 b4de47a0bcef8b61d9f5a363ad62cdf1
BLAKE2b-256 ed44471b44b9b4848f1fb3a8f2bf0036dd7cf7c380b43731ed9715c823db32d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.2-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.2-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: xy-0.0.2-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.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1b6b080081d00b49e3a657f584d611d50dff438c89632f023a2020171dcd9183
MD5 f3998879a2abd68176191cb74bd43120
BLAKE2b-256 dcb0c27fa0e9940fa6510b73bf76ce02abfe7744442c3b97f2734b20877ad93e

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.2-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.2-py3-none-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: xy-0.0.2-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.2-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a8b8e168b577c819f94f98ade1d5513be4f0ae7ffe8900770633eead9b5f9682
MD5 01a409b01d8683763c2cab567bc06eb0
BLAKE2b-256 89f3717d585e70849bb5aa3e4373a79cefbda5a96955c1895466aa6a5294936f

See more details on using hashes here.

Provenance

The following attestation bundles were made for xy-0.0.2-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