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)
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)
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)
| File | Size | Uploaded | |
|---|---|---|---|
| mpl_fill_cmap_between-0.3.1.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mpl_fill_cmap_between-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
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
|