ColorDatabase¶
- class ColorDatabase(mapping)[source]¶
Bases:
dict
Dictionary subclass used to replace the builtin matplotlib color database. This allows users to draw colors from named colormaps and color cycles for any plotting command that accepts a
color
keyword arg. Seecache
for details.- Parameters
mapping (dict-like) – The colors.
Attributes Summary
A special dictionary subclass capable of retrieving colors “on-the-fly” from registered colormaps and color cycles.
Methods Summary
__setitem__
(key, value)Add a color to the database and clear the cache.