plastic surgery for plt


License
Other
Install
pip install plastik==0.11.1

Documentation

plastik

pre-commit Code style: black

plt assist, plastic surgery for plt

Install

plastik is available through PyPI:

pip install plastik

Installing the development version is done using uv:

git clone https://github.com/engeir/plastik.git
cd plastik
uv sync

Usage

import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np

import plastik

mpl.style.use("plastik.default")
fig, axs = plastik.figure_grid(
    2,
    2,
    {
        "labels": ["Hello subplot title", 1, r"$4\hbar$", None],
        "pos": (0.6, 0.1),
        "share_axes": "x",
        "columns_first": True,
    },
)
for i, ax in enumerate(axs):
    ax.plot(np.array([1, 2, 3]), np.array([1, 2, 3]) * i)
fig.savefig("figure_grid_opts.png")
plt.show()

See more examples and their output.