@@ -745,35 +745,34 @@ def func_r(x):
745745
746746
747747class ListedColormap (Colormap ):
748- """Colormap object generated from a list of colors.
748+ """
749+ Colormap object generated from a list of colors.
749750
750751 This may be most useful when indexing directly into a colormap,
751752 but it can also be used to generate special colormaps for ordinary
752753 mapping.
753- """
754- def __init__ (self , colors , name = 'from_list' , N = None ):
755- """
756- Make a colormap from a list of colors.
757754
758- *colors*
759- a list of matplotlib color specifications,
760- or an equivalent Nx3 or Nx4 floating point array
761- (*N* rgb or rgba values)
762- *name*
763- a string to identify the colormap
764- *N*
765- the number of entries in the map. The default is *None*,
766- in which case there is one colormap entry for each
767- element in the list of colors. If::
755+ Parameters
756+ ----------
757+ colors : list, array
758+ List of Matplotlib color specifications, or an equivalent Nx3 or Nx4
759+ floating point array (*N* rgb or rgba values).
760+ name : str, optional
761+ String to identify the colormap.
762+ N : int, optional
763+ Number of entries in the map. The default is *None*, in which case
764+ there is one colormap entry for each element in the list of colors.
765+ If::
768766
769- N < len(colors)
767+ N < len(colors)
770768
771- the list will be truncated at *N*. If::
769+ the list will be truncated at *N*. If::
772770
773- N > len(colors)
771+ N > len(colors)
774772
775- the list will be extended by repetition.
776- """
773+ the list will be extended by repetition.
774+ """
775+ def __init__ (self , colors , name = 'from_list' , N = None ):
777776 self .monochrome = False # True only if all colors in map are
778777 # identical; needed for contouring.
779778 if N is None :
0 commit comments