Logo Search packages:      
Sourcecode: matplotlib version File versions  Download package

def matplotlib::pylab::colorbar_classic (   mappable = None,
  cax = None,
  orientation = 'vertical',
  tickfmt = '%1.1f',
  cspacing = 'proportional',
  clabels = None,
  drawedges = False,
  edgewidth = 0.5,
  edgecolor = 'k' 
)

Create a colorbar for mappable; if mappable is None,
use current image.

tickfmt is a format string to format the colorbar ticks

cax is a colorbar axes instance in which the colorbar will be
placed.  If None, as default axesd will be created resizing the
current aqxes to make room for it.  If not None, the supplied axes
will be used and the other axes positions will be unchanged.

orientation is the colorbar orientation: one of 'vertical' | 'horizontal'

cspacing controls how colors are distributed on the colorbar.
if cspacing == 'linear', each color occupies an equal area
on the colorbar, regardless of the contour spacing.
if cspacing == 'proportional' (Default), the area each color
occupies on the the colorbar is proportional to the contour interval.
Only relevant for a Contour image.

clabels can be a sequence containing the
contour levels to be labelled on the colorbar, or None (Default).
If clabels is None, labels for all contour intervals are
displayed. Only relevant for a Contour image.

if drawedges == True, lines are drawn at the edges between
each color on the colorbar. Default False.

edgecolor is the line color delimiting the edges of the colors
on the colorbar (if drawedges == True). Default black ('k')

edgewidth is the width of the lines delimiting the edges of
the colors on the colorbar (if drawedges == True). Default 0.5

return value is the colorbar axes instance

Definition at line 348 of file pylab.py.

                           :
    """
    Create a colorbar for mappable; if mappable is None,
    use current image.

    tickfmt is a format string to format the colorbar ticks

    cax is a colorbar axes instance in which the colorbar will be
    placed.  If None, as default axesd will be created resizing the
    current aqxes to make room for it.  If not None, the supplied axes
    will be used and the other axes positions will be unchanged.

    orientation is the colorbar orientation: one of 'vertical' | 'horizontal'

    cspacing controls how colors are distributed on the colorbar.
    if cspacing == 'linear', each color occupies an equal area
    on the colorbar, regardless of the contour spacing.
    if cspacing == 'proportional' (Default), the area each color
    occupies on the the colorbar is proportional to the contour interval.
    Only relevant for a Contour image.

    clabels can be a sequence containing the
    contour levels to be labelled on the colorbar, or None (Default).
    If clabels is None, labels for all contour intervals are
    displayed. Only relevant for a Contour image.

    if drawedges == True, lines are drawn at the edges between
    each color on the colorbar. Default False.

    edgecolor is the line color delimiting the edges of the colors
    on the colorbar (if drawedges == True). Default black ('k')

    edgewidth is the width of the lines delimiting the edges of
    the colors on the colorbar (if drawedges == True). Default 0.5

    return value is the colorbar axes instance
    """
    if mappable is None:
        mappable = gci()
    ret = gcf().colorbar_classic(mappable, cax = cax,
                         orientation = orientation,
                         tickfmt = tickfmt,
                         cspacing=cspacing,
                         clabels=clabels,
                         drawedges=drawedges,
                         edgewidth=edgewidth,
                         edgecolor=edgecolor)
    draw_if_interactive()
    return ret

def colors():


Generated by  Doxygen 1.6.0   Back to index