`matplotlib` binder with custom styles and routines for fast plotting
Project description
myplotlib
matplotlib binder with custom styles and routines for fast plotting. see previews of available styles.
installation
pip install myplotlib
usage
loading style, fonts & colormaps
import matplotlib.pyplot as plt
from myplotlib import register
register()
plt.style.use(STYLE)
# STYLE can be:
# - fancy.dark, fancy.light
# - classic.dark, classic.light
# - mono.dark, mono.light
# - guttenberg.dark, guttenberg.light
# - latex
# you may also combine the styles:
plt.style.use([STYLE1, STYLE2])
# and you can temporarily load the style:
with plt.style.context(STYLE):
plt.plot(...)
register()loads the bundled styles, fonts, and colormaps into Matplotlib. importingmyplotlibstill registers them for backward compatibility, but the explicit call keeps linters from flagging an unused side-effect import.
auxiliary plotting functions
import myplotlib.plots as myplt
# type for docstring:
myplt?
# for specific function:
myplt.plot2d?
# preview custom styles with built-in functions
import myplotlib.tests as mypltest
# type for docstring:
mypltest?
the guttenberg styles mimic renaissance-era book illustrations: old-style lettering (P22 Operina Pro, with EB Garamond as fallback for missing glyphs), imperfect hand-drawn lines, and a single-ink line cycle. they pair well with myplt.hatchedCircle, which shades circles with engraving-style hatching (optionally only the crescent shadow, as on old drawings of moon phases):
with plt.style.context("guttenberg.light"):
fig, ax = plt.subplots()
ax.set_aspect("equal")
myplt.hatchedCircle(ax, (0, 0), 1, angle=45, spacing=0.15)
myplt.hatchedCircle(ax, (2.5, 0), 1, shade_from=0, shade_depth=0.8)
for more usage examples checkout the tests/ submodule.
requirements
python >= 3.8matplotlib >= 3.5.0,numpylatex(used forfancyandlatexonly)numba>=0.57.0
To-do
- isocontour plotting
- add streamplot for fieldline plotting
- print all the newly added colormaps and the default color sequence
- add a test plot for the demo
- add image to readme
- dark mode
- monotype non-Latex mode
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file myplotlib-1.8.2.tar.gz.
File metadata
- Download URL: myplotlib-1.8.2.tar.gz
- Upload date:
- Size: 4.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fff0de8ce9f2936895f245ad1d05698385036b47be503cb84a458404fb94fb0a
|
|
| MD5 |
177b9bd3d618287cd21056cc17fcde66
|
|
| BLAKE2b-256 |
1b948f193f1b9c908ba9a3ccc32f38311b622be2f9f91c2dd9b09cfa530e66b0
|
Provenance
The following attestation bundles were made for myplotlib-1.8.2.tar.gz:
Publisher:
publish.yml on haykh/myplotlib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
myplotlib-1.8.2.tar.gz -
Subject digest:
fff0de8ce9f2936895f245ad1d05698385036b47be503cb84a458404fb94fb0a - Sigstore transparency entry: 2063933536
- Sigstore integration time:
-
Permalink:
haykh/myplotlib@1c4c18f19a50fad3cb0b63e70dc5f4d715320805 -
Branch / Tag:
refs/tags/v1.8.2 - Owner: https://github.com/haykh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1c4c18f19a50fad3cb0b63e70dc5f4d715320805 -
Trigger Event:
release
-
Statement type:
File details
Details for the file myplotlib-1.8.2-py3-none-any.whl.
File metadata
- Download URL: myplotlib-1.8.2-py3-none-any.whl
- Upload date:
- Size: 4.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
620dcde413511aa2a6f536d94adb6705c8cd43bd20bd69a21b6e06508993c7c1
|
|
| MD5 |
284a3c945fbb8ad375af8949cd4446d7
|
|
| BLAKE2b-256 |
641c638e55aae0058ab035fc4c5d96e727f7b802cb6b082cb2e794c79ab425e7
|
Provenance
The following attestation bundles were made for myplotlib-1.8.2-py3-none-any.whl:
Publisher:
publish.yml on haykh/myplotlib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
myplotlib-1.8.2-py3-none-any.whl -
Subject digest:
620dcde413511aa2a6f536d94adb6705c8cd43bd20bd69a21b6e06508993c7c1 - Sigstore transparency entry: 2063933798
- Sigstore integration time:
-
Permalink:
haykh/myplotlib@1c4c18f19a50fad3cb0b63e70dc5f4d715320805 -
Branch / Tag:
refs/tags/v1.8.2 - Owner: https://github.com/haykh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1c4c18f19a50fad3cb0b63e70dc5f4d715320805 -
Trigger Event:
release
-
Statement type: