Skip to content
Projects

maxplotlib

One canvas, four backends. Render the same figure as a PNG with Matplotlib, an interactive Plotly chart, a plotext figure in the terminal, or TikZ code for LaTeX.
import numpy as np
from maxplotlib import Canvas
x = np.linspace(0, 2 * np.pi, 200)
canvas, ax = Canvas.subplots()
ax.plot(x, np.sin(x))
canvas.show() # Matplotlib, the default
canvas.show(backend="plotly") # interactive
canvas.show(backend="plotext") # in the terminal
canvas.savefig("sine.pdf", backend="tikzfigure") # TikZ, compiled with LaTeX

Quickstart

Build a canvas, add lines and subplots, and render it with each backend: Quickstart.

Tutorials

From plot types, styling and layers to Gantt and flame charts and xarray data: Tutorials.

Matplotlib import

Turn an existing Matplotlib figure into a canvas with Canvas.from_matplotlib: what is supported.

API reference

Every class and function, from the docstrings: API.