Skip to content

Template package for distributing Matplotlib colormaps.

License

Notifications You must be signed in to change notification settings

matplotlib/matplotlib-cmap-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Template package for distributing Matplotlib colormaps

This is a template package for distributing Matplotlib colormaps as Python packages.

To use it, clone this repository, edit the (intentionally commented-out) metadata in setup.py, and edit the colormap data in lib/nifty.py and rename it to your own colormap name.

You can then install the package using pip install ... (or alternatively just move lib/nifty.py into your own Python project), then use the colormap with e.g.

from matplotlib import pyplot as plt
import nifty

fig, ax = plt.subplots()
ax.imshow([[0, 1], [2, 3]], cmap=nifty.cmap)

# or register the colormap to use the name as string

nifty.register_cmap()
fig, ax = plt.subplots()
ax.imshow([[0, 1], [2, 3]], cmap="nifty")

and just visualize the colormap with

$ python -m nifty

About

Template package for distributing Matplotlib colormaps.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages