Skip to content

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

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy