XY - Fast, GPU-accelerated Python charting library for massive datasets

Show HN: XY – Fast, composable, GPU-accelerated charts, written in Rust

XY - Fast, GPU-accelerated Python charting library for massive datasets

XY is a high-performance Python charting library designed for the web and notebooks, capable of rendering up to 100 million points with seamless interactivity. Built with a Rust core and GPU acceleration, it dynamically computes only what the screen needs, ensuring consistent speed regardless of dataset size. Users can customize every layer using Python, CSS, or Tailwind, and easily integrate charts into Reflex apps or export them as static files. Whether visualizing scientific data or building complex dashboards, XY offers a flexible, composable alternative to traditional plotting tools.

XY holds 0.071 s at 10k and 0.081 s at 100M, flat across four orders of magnitude, because above 200k rows it draws a screen-bounded density surface instead of one marker per row, and zoom drills back to exact rows.
  1. kasts

    I’m not convinced GPU acceleration is a meaningful advantage for most charting use cases. Most dashboards don’t render enough data for it to matter. Once a chart is dense enough for rendering to become the bottleneck, it normally is already be too crowded to be meaningful.

    Zooming can justify supporting larger datasets, but sampling/viewport culling and level of detail often avoid drawing unnecessary points...

  2. mtweak

    I can imagine this useful to 'compress' gigabytes of data onto a 2d canvas quickly. For that, I appreciate the effort.

    One thing that would be useful is to read up on Ed Tufte's principles of data visualization. Many graph libraries don't implement basic visualization principles to make they key point clear, easy to see while still keeping the full depth and complexity of data visible.

  3. hantusk

    Check out mosaic from uwdata which works on top of Observable plot

    Or plotly-resampler which works on top of plotly and uses the rust package tsdownsample to aggregate on the 4pixels per pixel shown level (to make antialias work)

    the grammar of graphics approach really is a great abstraction, and I'd love to see xy work in that direction

  4. ahns

    Interesting; how do the examples compare to datashader?

    Edit: for my use cases, I use napari (~1e7-8 points) if I need true interactivity; otherwise, datashader/holoviz, or even just fast-histogram's 2D histograms work.

    For extremely large point clouds, these caveats[0] still apply. It irks me when people make dense scatterplots without any indication of just how dense some portions are.

    Still, if it can indeed handle 1e10 points, that's pretty impressive.

    [0]: https://datashader.org/user_guide/Plotting_Pitfalls.html

  5. adhami

    it's possible to render data out-of-core with XY, allowing it to render the entirety of OpenStreetMaps (that's 10,742,674,832 nodes!) with sub-second pan/zooms. it's a bit difficult to host online but you can try it out locally: https://github.com/reflex-dev/xy/tree/main/examples/osm

More from this day

2026-07-28