A Rust plotting library powered by Plotly.js for creating interactive and static visualizations.
Plotly.rs is a Rust plotting library that provides a native interface to the Plotly.js visualization engine. It allows developers to create interactive and static plots directly from Rust code, supporting HTML exports for web viewing and image exports for publications. The library solves the need for high-quality, flexible data visualization within Rust applications without requiring JavaScript expertise.
Rust developers and data scientists who need to create interactive visualizations, export plots as images, or embed charts in web applications using Rust. It's particularly useful for those working in scientific computing, data analysis, or web development with WASM.
Developers choose Plotly.rs because it brings the proven, feature-rich Plotly.js ecosystem to Rust with a native API, eliminating context switching. It offers multiple export options (interactive HTML, static images), supports WASM for web integration, and provides compile-time customization through feature flags.
Plotly for Rust
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates fully interactive plots saved as HTML files using methods like Plot.write_html(), viewable in any browser with Plotly.js capabilities.
Supports multiple image formats (PNG, JPEG, SVG, PDF) via WebDriver-based plotly_static or legacy Kaleido backend, enabling publication-ready outputs.
Seamlessly works in WebAssembly environments with frontend frameworks like Yew, as shown in the README example for browser-based visualizations.
Handles large datasets efficiently using methods like LTTB via integration with crates like minmaxlttb-rs, preserving visual characteristics.
Static image export requires external tools: WebDriver needs a browser and driver installation, while Kaleido mandates manual binary setup or downloads, adding operational complexity.
Relies on numerous compile-time feature flags (e.g., static_export_default, kaleido) that can overwhelm users and fragment functionality, as admitted in the README's legacy vs. new backend notes.
Embedding JavaScript with the plotly_embed_js feature increases HTML file size significantly and adds ~3.5 MB to the library itself, with trade-offs in load times.