|
From: <ef...@us...> - 2008-06-22 08:19:57
|
Revision: 5628
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5628&view=rev
Author: efiring
Date: 2008-06-22 01:19:56 -0700 (Sun, 22 Jun 2008)
Log Message:
-----------
Improve docstrings, inheritance of ListedColormap
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/colors.py
Modified: trunk/matplotlib/lib/matplotlib/colors.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/colors.py 2008-06-21 21:07:54 UTC (rev 5627)
+++ trunk/matplotlib/lib/matplotlib/colors.py 2008-06-22 08:19:56 UTC (rev 5628)
@@ -540,18 +540,19 @@
self._set_extremes()
-class ListedColormap(LinearSegmentedColormap):
+class ListedColormap(Colormap):
"""Colormap object generated from a list of colors.
- Color boundaries are evenly spaced. This is intended for simulating
- indexed color selection, but may be useful for generating
- special colormaps also.
+ This may be most useful when indexing directly into a colormap,
+ but it can also be used to generate special colormaps for ordinary
+ mapping.
"""
def __init__(self, colors, name = 'from_list', N = None):
"""
Make a colormap from a list of colors.
- colors is a list of matplotlib color specifications
+ colors is a list of matplotlib color specifications,
+ or an equivalent Nx3 floating point array (N rgb values)
name is a string to identify the colormap
N is the number of entries in the map. The default is None,
in which case there is one colormap entry for each
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|