explaingit

plotters-rs/plotters

4,576RustAudience · developerComplexity · 3/5Setup · easy

TLDR

Plotters is a Rust library for creating charts and graphs, line charts, histograms, 3D plots, and more, that can output to PNG files, SVG, desktop windows, or web pages.

Mindmap

mindmap
  root((plotters))
    Chart types
      Line charts
      Histograms
      3D surface plots
      Candlestick charts
    Output targets
      PNG files
      SVG files
      Desktop window
      Browser canvas
    Use cases
      Data visualization
      Web charts
      Jupyter notebooks
    Audience
      Rust developers
      Data scientists
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Generate PNG or SVG charts from data in a Rust application.

USE CASE 2

Embed interactive charts in a web page using the same Rust code compiled to WebAssembly.

USE CASE 3

Create and preview data visualizations interactively inside a Jupyter notebook.

Tech stack

RustWebAssemblyGTK

Getting it running

Difficulty · easy Time to first run · 30min

Different output backends (GTK, WebAssembly, etc.) live in separate packages and need to be added individually.

License details not mentioned in the explanation.

In plain English

Plotters is a library for creating charts and data visualizations in the Rust programming language. It handles the drawing work so that developers can focus on their data rather than the mechanics of rendering lines, axes, and labels. It runs both in standard desktop applications and in web browsers, which means the same charting code can power a native tool or a web page. The library supports a wide variety of chart types. The gallery in the README shows line charts, stock candlestick charts, histograms, scatter plots, 3D surface plots, area charts, error bars, box plots, and animated charts, among others. It also supports fractal and mathematical diagrams, so it is not limited to business data. A key feature is the backend system. Rather than drawing to one fixed format, Plotters can direct its output to PNG bitmap files, SVG vector files, a live desktop window, a GTK window, or an HTML5 canvas in the browser via WebAssembly. You pick the backend that fits your deployment target, and the chart drawing code stays the same. Some backends live in separate repositories rather than the main package. The library also works inside Jupyter notebooks using the evcxr kernel, which lets data scientists run and preview charts interactively without building a full application. An interactive tutorial notebook is available for people who want to learn the library step by step. Plotters is written entirely in Rust, with no dependency on a C charting library underneath. Installation follows standard Rust package management by adding the crate to a project's dependency file. The README includes a quick-start example and links to full API documentation.

Copy-paste prompts

Prompt 1
Using the Plotters Rust crate, write code that reads a Vec of (f64, f64) data points and saves a line chart as 'output.png'.
Prompt 2
Show me how to render a Plotters chart to an HTML5 canvas in the browser using WebAssembly.
Prompt 3
Write a Plotters example that draws a candlestick stock chart with date labels on the X axis.
Prompt 4
How do I add Plotters to my Rust project and draw a simple histogram from a list of integers?
Open on GitHub → Explain another repo

← plotters-rs on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.