XY是一款开源Python图表库,专为web、笔记本和静态导出场景设计,现已发布alpha版本[1]。该库通过Rust核心计算和二进制缓冲传输实现高性能渲染,支持GPU加速和交互式可视化功能[1]。
性能方面,XY能够处理从小数据集到10亿点级别的大规模数据集[1]。在100万点数据集的渲染测试中,XY耗时0.081秒,相比之下Matplotlib需要13.4秒,Plotly需要9.8秒[1]。项目还包含OpenStreetMap示例,展示了其对10亿点数据集的处理能力[1]。
该库提供灵活的使用方式,支持声明式和matplotlib风格两种图表编写方式[1]。用户可通过pip install xy命令安装[1],支持HTML、PNG、SVG、PDF等多种导出格式[1]。此外,XY提供与Reflex框架的集成适配器reflex-xy,便于在该框架中使用[1]。项目目前处于alpha阶段,正在接收频繁更新[1]。
XY is an open-source Python charting library designed for web, notebook, and static export applications, featuring GPU acceleration and interactive visualization capabilities[1]. The library leverages a Rust-based core computation engine and binary buffer transmission to deliver high-performance rendering across datasets ranging from small collections to those containing up to 10 billion points[1].
The project demonstrates significant performance advantages over existing solutions. When rendering a 100-million-point dataset, XY maintains a rendering time of 0.081 seconds, substantially outperforming Matplotlib's 13.4 seconds and Plotly's 9.8 seconds[1]. The library supports multiple export formats including HTML, PNG, SVG, and PDF[1]. Installation is available through pip via the command pip install xy[1].
Currently in alpha stage and receiving frequent updates, XY offers two distinct approaches to chart creation: a declarative syntax and a matplotlib-style interface[1]. The project includes integration support for the Reflex framework through a dedicated reflex-xy adapter[1].