matplotlib.colorbar
index
/astro-wise/AWEHOME/x86_64/AWBASE/common/lib/python2.5/site-packages/matplotlib/colorbar.py

Colorbar toolkit with two classes and a function:
 
    ColorbarBase is the base class with full colorbar drawing functionality.
        It can be used as-is to make a colorbar for a given colormap;
        a mappable object (e.g., image) is not needed.
 
    Colorbar is the derived class for use with images or contour plots.
 
    make_axes is a function for resizing an axes and adding a second axes
        suitable for a colorbar
 
The Figure.colorbar() method uses make_axes and Colorbar; the pylab.colorbar()
function is a thin wrapper over Figure.colorbar().

 
Modules
       
matplotlib.cm
matplotlib.colors
matplotlib.numerix
matplotlib.ticker

 
Classes
       
matplotlib.cm.ScalarMappable
ColorbarBase
Colorbar

 
class Colorbar(ColorbarBase)
    
Method resolution order:
Colorbar
ColorbarBase
matplotlib.cm.ScalarMappable

Methods defined here:
__init__(self, ax, mappable, **kw)
add_lines(self, CS)
Add the lines from a non-filled ContourSet to the colorbar.
notify(self, mappable)
Manually change any contour line colors.  This is called
when the image or contour plot to which this colorbar belongs
is changed.

Methods inherited from ColorbarBase:
draw_all(self)
Calculate any free parameters based on the current cmap and norm,
and do all the drawing.
set_alpha(self, alpha)
set_label(self, label, **kw)

Methods inherited from matplotlib.cm.ScalarMappable:
add_observer(self, mappable)
whenever the norm, clim or cmap is set, call the notify
instance of the mappable observer with self.
 
This is designed to allow one image to follow changes in the
cmap of another image
autoscale(self)
Autoscale the scalar limits on the norm instance using the
current array
autoscale_None(self)
Autoscale the scalar limits on the norm instance using the
current array, changing only limits that are None
changed(self)
Call this whenever the mappable is changed so observers can
update state
get_array(self)
Return the array
get_clim(self)
return the min, max of the color limits for image scaling
set_array(self, A)
Set the image array from numeric/numarray A
set_clim(self, vmin=None, vmax=None)
set the norm limits for image scaling; if vmin is a length2
sequence, interpret it as (vmin, vmax) which is used to
support setp
 
ACCEPTS: a length 2 sequence of floats
set_cmap(self, cmap)
set the colormap for luminance data
 
ACCEPTS: a colormap
set_colorbar(self, im, ax)
set the colorbar image and axes associated with mappable
set_norm(self, norm)
set the normalization instance
to_rgba(self, x, alpha=1.0)
Return a normalized rgba array corresponding to x.
If x is already an rgb or rgba array, return it unchanged.

 
class ColorbarBase(matplotlib.cm.ScalarMappable)
     Methods defined here:
__init__(self, ax, cmap=None, norm=None, alpha=1.0, values=None, boundaries=None, orientation='vertical', extend='neither', spacing='uniform', ticks=None, format=None, drawedges=False, filled=True)
add_lines(self, levels, colors, linewidths)
Draw lines on the colorbar.
draw_all(self)
Calculate any free parameters based on the current cmap and norm,
and do all the drawing.
set_alpha(self, alpha)
set_label(self, label, **kw)

Methods inherited from matplotlib.cm.ScalarMappable:
add_observer(self, mappable)
whenever the norm, clim or cmap is set, call the notify
instance of the mappable observer with self.
 
This is designed to allow one image to follow changes in the
cmap of another image
autoscale(self)
Autoscale the scalar limits on the norm instance using the
current array
autoscale_None(self)
Autoscale the scalar limits on the norm instance using the
current array, changing only limits that are None
changed(self)
Call this whenever the mappable is changed so observers can
update state
get_array(self)
Return the array
get_clim(self)
return the min, max of the color limits for image scaling
notify(self, mappable)
If this is called then we are pegged to another mappable.
Update our cmap, norm, alpha from the other mappable.
set_array(self, A)
Set the image array from numeric/numarray A
set_clim(self, vmin=None, vmax=None)
set the norm limits for image scaling; if vmin is a length2
sequence, interpret it as (vmin, vmax) which is used to
support setp
 
ACCEPTS: a length 2 sequence of floats
set_cmap(self, cmap)
set the colormap for luminance data
 
ACCEPTS: a colormap
set_colorbar(self, im, ax)
set the colorbar image and axes associated with mappable
set_norm(self, norm)
set the normalization instance
to_rgba(self, x, alpha=1.0)
Return a normalized rgba array corresponding to x.
If x is already an rgb or rgba array, return it unchanged.

 
Functions
       
Interval(...)
Interval(val1, val2)
Value(...)
Value(x)
make_axes(parent, **kw)
Resize and reposition a parent axes, and return a child
axes suitable for a colorbar.
 
cax, kw = make_axes(parent, **kw)
 
Keyword arguments may include the following (with defaults):
    orientation = 'vertical'  or 'horizontal'
 
    fraction    = 0.15; fraction of original axes to use for colorbar
    pad         = 0.05 if vertical, 0.15 if horizontal; fraction
                          of original axes between colorbar and
                          new image axes
    shrink      = 1.0; fraction by which to shrink the colorbar
    aspect      = 20; ratio of long to short dimensions
 
 
 
All but the first of these are stripped from the input kw set.
 
Returns (cax, kw), the child axes and the reduced kw dictionary.

 
Data
        colorbar_doc = '\nAdd a colorbar to a plot.\n\nFunction signatures:...e, do not use any of the\naxes properties kwargs.\n'
colormap_kw_doc = "\n extend='neither', 'both', 'min', 'max'\n...g\n value in values will be used.\n\n"
make_axes_kw_doc = '\n fraction = 0.15; fraction of origina...ct = 20; ratio of long to short dimensions\n\n'
rcParams = {'axes.axisbelow': False, 'axes.edgecolor': 'k', 'axes.facecolor': 'w', 'axes.formatter.limits': (-7, 7), 'axes.grid': False, 'axes.hold': True, 'axes.labelcolor': 'k', 'axes.labelsize': 12, 'axes.linewidth': 1.0, 'axes.titlesize': 14, ...}