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 rye:

git clone https://github.com/engeir/plastik.git
cd plastik
rye 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.8.1.tar.gz (793.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.8.1-py3-none-any.whl (41.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: plastik-0.8.1.tar.gz
  • Upload date:
  • Size: 793.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for plastik-0.8.1.tar.gz
Algorithm Hash digest
SHA256 ec4a11f92494c69be2cb421816674341598727aacb8610ee4137e7db01b0a4a7
MD5 15a0f3c64ab0cc917f69e241853d9e83
BLAKE2b-256 ffeb7ecc0c83e640614b9f323342cb1550e7bbaae59334f059e62b6f714c7acb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: plastik-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 41.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for plastik-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c612721787da9c0c98a07a60ab4b6a0c7be58973a47668bf5fc023adb825bb65
MD5 732d376914279aca845e0cda3779a77b
BLAKE2b-256 15ca260c5329f3a93bd5b01afe0b5ce1464f2cdf81fd0f841c6437fde9340981

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