Reflex AI has launched XY, an Apache-2.0 Python charting library for interactive 2D visualization. Most Python charting stacks create one drawable object per row, so previous just a few hundred thousand factors, render, hover, and zoom degrade. XY strikes the work right into a native Rust core, sends the browser typed binary buffers as an alternative of JSON, and attracts with WebGL2. Within the phrases of the benchmark, XY holds 0.071 s at 10,000 factors and 0.081 s at 100 million. It ships as pip set up xy and requires Python 3.11 or newer.
Is it deployable
XY is early alpha at model 0.0.1. It ships as pip set up xy and requires Python 3.11 or newer.
That maps to a transparent deployment envelope. Startups and mid-size information groups can undertake it now for inside analytics, notebooks, and shareable artifacts. Regulated enterprises ought to pilot it somewhat than put it on a customer-facing essential path. Match is strongest the place row counts are the precise bottleneck: quantitative finance (tick information), genomics and bioinformatics (Manhattan plots, allele-frequency scans), observability and telemetry, astronomy, and geospatial analytics. Right here is methods to set up it in 1 line.
Explainer
How the illustration ladder works
XY retains canonical f64 columns in a ColumnStore in Python and picks a rendered illustration per hint. Present defaults begin M4 decimation above 10,000 rows for lengthy ordered strains, and automated scatter density above 200,000 factors. Density grids default to 512×384 cells. The docs are express that these are pre-1.0 coverage thresholds, not API ensures.
As a result of actual values keep in Python, hover, choice, and decide() nonetheless resolve unique rows when the lively tier has a precise mapping. Zooming right into a slender window returns actual seen factors for a padded aligned window, and close by pans render from that cached window with out one other request. Reflex is cautious to not overclaim right here: density is natively binned and GPU-rendered, not an all-GPU ingest pipeline, and ingest, binning, and decimation nonetheless scale with supply row rely.
Efficiency
The benchmark drives each library via an actual browser and stops the clock solely when the canvas is verified appropriate and steady throughout 10 byte-identical frames. Measurements come from one Apple M5 Professional, one run per cell.
| Factors | XY | Matplotlib (WebAgg) | Plotly (scattergl) |
|---|---|---|---|
| 1M | 0.084 s | 0.357 s | 0.614 s |
| 10M | 0.083 s | 2.804 s | 3.367 s |
| 50M | 0.076 s | 13.385 s | ✕ |
| 100M | 0.081 s | ✕ | ✕ |
That may be a said 34× speedup at 10M and 177× at 50M. Peak Python-side reminiscence at 10M is 0.32 GiB for XY towards 0.84 GiB for Matplotlib and 1.86 GiB for Plotly. With density=False, XY nonetheless attracts 100M actual markers in 1.343 s on 5.26 GiB. Reflex additionally experiences rendering the total OpenStreetMap dataset — 10 billion factors.
A ten-million-point interactive scatter exports to 258 KiB of HTML, versus a said 259 MiB for the Plotly equal. The payload stays close to 258 KiB from 1M via 100M rows.
API floor and integration
Charts are composed declaratively from marks, axes, legends, tooltips, and annotations. Fourteen chart households ship immediately, together with scatter, line, space, histogram, field, violin, ECDF, heatmap, hexbin, and contour. Styling accepts CSS and Tailwind lessons via steady DOM slots. For migration, import xy.pyplot as plt runs frequent Matplotlib pyplot code, although the compatibility information notes not every little thing is supported. A separate reflex-xy adapter turns any chart right into a Reflex part with no JavaScript or iframe.
Key Takeaways
- XY holds ~0.08 s render time from 10k to 100M factors by drawing screen-bounded representations, not per-row markers.
- Rust core plus binary transport cuts a 10M-point interactive export to 258 KiB towards Plotly’s 259 MiB.
- Precise f64 columns keep in Python, so hover, choice, and zoom drilldown nonetheless return unique rows.
- Deployable immediately for notebooks, inside dashboards, and shareable HTML; model 0.0.1 alpha argues towards essential paths.
- Greatest match is finance, genomics, telemetry, and astronomy, the place sampling earlier than plotting is the present default.
Take a look at the GitHub Repo and Technical particulars. Additionally, be happy to comply with us on Twitter and don’t neglect to hitch our 150k+ML SubReddit and Subscribe to our E-newsletter. Wait! are you on telegram? now you possibly can be a part of us on telegram as nicely.
Must companion with us for selling your GitHub Repo OR Hugging Face Web page OR Product Launch OR Webinar and so on.? Join with us
Asif Razzaq is the CEO of Marktechpost Media Inc.. As a visionary entrepreneur and engineer, Asif is dedicated to harnessing the potential of Synthetic Intelligence for social good. His most up-to-date endeavor is the launch of an Synthetic Intelligence Media Platform, Marktechpost, which stands out for its in-depth protection of machine studying and deep studying information that’s each technically sound and simply comprehensible by a large viewers. The platform boasts of over 2 million month-to-month views, illustrating its recognition amongst audiences.
