Skip to main content

mpl_fill_cmap_between

Create fill_between-like plots filled with any matplotlib's colormap.

Install

pip install mpl_fill_cmap_between

Examples

The function fill_cmap_between (and also the function fill_cmap_between_x) can be used in the following manner:

import numpy as np
import matplotlib.pyplot as plt
from mpl_fill_cmap_between import fill_cmap_between, fill_cmap_between_x

x = np.linspace(-10, 10, 50)
y = x**2 - 40

fig = plt.figure(figsize=(4.8, 2.0))
ax = fig.add_subplot(111)

fill_cmap_between(x, y * 0.1, 0, ax=ax, cmap="viridis", kw_line_1=dict(color="k"),
                  kw_line_2=dict(color="k", lw=0.5))
ax.set_aspect("equal")

fig.tight_layout()
fig.savefig("example.pdf", dpi=300)

Example

The plot can also be rotated by an angle from a given origin:

import numpy as np
import matplotlib.pyplot as plt
from mpl_fill_cmap_between import fill_cmap_between, fill_cmap_between_x

x = np.linspace(0, 10, 50)
y = (x - 5)**2 - 10

fig = plt.figure(figsize=(4.8, 2.0))
ax = fig.add_subplot(111)

fill_cmap_between(x, y * 0.1, 0, ax=ax, cmap="viridis", kw_line_1=dict(color="k"),
                  kw_line_2=dict(color="k", lw=0.5), angle=40, origin=(10, 0))
ax.set_aspect("equal")
ax.grid(True, ls=":")

fig.tight_layout()
fig.savefig("example_02.png", dpi=300)

Example

Metadata

Release files for mpl-fill-cmap-between 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mpl-fill-cmap-between 0.3.1
File Size Uploaded Provenance Actions
mpl_fill_cmap_between-0.3.1.tar.gz 2.9 kB Without provenance Details for mpl_fill_cmap_between-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mpl-fill-cmap-between 0.3.1
File Interpreter ABI Platform Actions
mpl_fill_cmap_between-0.3.1-py3-none-any.whl Python 3 none any Details for mpl_fill_cmap_between-0.3.1-py3-none-any.whl

Total release size: 5.9 kB

Release files / mpl_fill_cmap_between-0.3.1.tar.gz

Download URL mpl_fill_cmap_between-0.3.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1e8f9ac1caa0e96cfba355fb0a7aec9ddd0882a2990559ac1e602a1e4945665a
BLAKE2b-256 checksum
How to use checksums
e0e2bc3eb91066c305a4614f0c44e2d78cd900a82ad74a7dcfacaaa7bff2f4b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.1 CPython/3.10.6 Linux/5.19.0-38-generic

Release files / mpl_fill_cmap_between-0.3.1-py3-none-any.whl

Download URL mpl_fill_cmap_between-0.3.1-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
842d48923a0481b155a7f735b867fd168ed0343b91316ba6261b14dd7c4eca8f
BLAKE2b-256 checksum
How to use checksums
174feec39fbd5be6c4e697a46e1989f931055bb2f4fea227f3d66459ca8edea6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.1 CPython/3.10.6 Linux/5.19.0-38-generic

Security for mpl-fill-cmap-between 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page