Skip to main content

plastic surgery for plt

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plastik-0.9.1.tar.gz (875.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plastik-0.9.1-py3-none-any.whl (44.7 kB view details)

Uploaded Python 3

File details

Details for the file plastik-0.9.1.tar.gz.

File metadata

  • Download URL: plastik-0.9.1.tar.gz
  • Upload date:
  • Size: 875.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for plastik-0.9.1.tar.gz
Algorithm Hash digest
SHA256 fb4ce219570f77f588878483d3bf84ebf803c31da79e36cd0796c4a5d84b5883
MD5 77d9943016b1280ba22da0e5a5a59a55
BLAKE2b-256 36680a158004fd0116dc6c5f45d7745ab3873d293d26f4ce5bce1856f5d1656c

See more details on using hashes here.

File details

Details for the file plastik-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: plastik-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 44.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for plastik-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3574fdb3b24df24c2a0e6a2fbb912dd9fff839cc6b0ec4eee63f3606fa59a4a3
MD5 5d3417b90ee98a21d28fb831a334b590
BLAKE2b-256 37c0d8aefbd03876c39d67fdb2dcb864fca665e60ec0a489891770530ad1da2e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page