Matplotlib Colors
A collection of curated colors and colormaps for matplotlib.
Installation
pip install matplotlib-colors
Demo
Examples
Colormaps
Call the register_cmaps function to add the new colormaps to matplotlib. Then the desired colormap can be specified by name as the cmap argument.
from matplotlib_colors import register_cmaps
register_cmaps() # Adds new colormaps to matplotlib
# Build your data viz as normal with matplotlib
import numpy as np
import matplotlib.pyplot as plt
x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
y = [x * x for x in x]
plt.scatter(x, y, c=range(12), cmap='analyst') # Specify one of the new colormap names
plt.colorbar()
plt.show()
Alternatively, all new colormap objects can be accessed directly by importing the colormaps dict and specifying a colormap by name.
import numpy as np
import matplotlib.pyplot as plt
from matplotlib_colors import colormaps
x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
y = [x * x for x in x]
plt.scatter(x, y, c=range(12), cmap=colormaps['analyst']) # Specify a colormap from colormaps dict
plt.colorbar()
plt.show()
The full list of colormap names can be found by importing the colormap_names list.
from matplotlib_colors import colormap_names
Colors
The package includes a large selection of colors that can be accessed directly by importing colors and specifying a color name.
import matplotlib.pyplot as plt
from matplotlib_colors import colors
x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
y = [x * x for x in x]
plt.scatter(x, y, c=colors['PL_RED']) # All points colored with PL_RED
plt.colorbar()
plt.show()
The full list of color names can be found by importing the color_names list.
from matplotlib_colors import color_names
Metadata
Release files for matplotlib-colors 1.0.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| matplotlib-colors-1.0.16.tar.gz | 6.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| matplotlib_colors-1.0.16-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.5 kB
Release files / matplotlib-colors-1.0.16.tar.gz
| Download URL | matplotlib-colors-1.0.16.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5f922c27b8960d5297be388d548445f1fb60c22495d303b610395e758f3bb99
|
|
BLAKE2b-256 checksum How to use checksums |
f73f17857bf2bada05135381f062eee382da0edf76ae4b36200c6eee49550d60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Release files / matplotlib_colors-1.0.16-py3-none-any.whl
| Download URL | matplotlib_colors-1.0.16-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d15e4e70fde7fa7d7f70e4ab7bb58057318f2bee489ffe2fd457b8eb0da58d7
|
|
BLAKE2b-256 checksum How to use checksums |
297d717fe8d0a8eeb4da65b2dcc00ef44c72d5eb6a78e16d2bfed11d06de69c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Security for matplotlib-colors 1.0.16
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.