Skip to main content

`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 myplotlib
import matplotlib.pyplot as plt

plt.style.use(STYLE)
# STYLE can be:
# - fancy.dark, fancy.light
# - classic.dark, classic.light
# - mono.dark, mono.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(...)

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?

for more usage examples checkout the tests/ submodule.

requirements

  • python >= 3.8
  • matplotlib >= 3.5.0, numpy
  • latex (used for fancy and latex only)
  • numba>=0.57.0

development

when deploying a new version, there are three necessary steps to take.

  1. increase the version string in myplotlib/__init__.py.
  2. generate the previews:
    python3 previews/export_previews.py
    
  3. build the new tarballs in the dist directory:
    python -m build --sdist --outdir dist .
    

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


Download files

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

Source Distribution

myplotlib-1.6.0.tar.gz (27.6 MB view details)

Uploaded Source

File details

Details for the file myplotlib-1.6.0.tar.gz.

File metadata

  • Download URL: myplotlib-1.6.0.tar.gz
  • Upload date:
  • Size: 27.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for myplotlib-1.6.0.tar.gz
Algorithm Hash digest
SHA256 a9945e6f6884197afc7fa8a9e457a9d8ca68bdb07778f589888bf27f0c108f75
MD5 31f54466b69ae5eefe451532ef5057da
BLAKE2b-256 9c6fe86588b5ed1e2eebfeeb3c597ee1324a14f4fa6367d71d50bef8e2f49951

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