chaco.plots.color_bar module

Defines the ColorBar class.

class chaco.plots.color_bar.ColorBar(*args, **kw)

Bases: chaco.abstract_plot_renderer.AbstractPlotRenderer

A color bar for a color-mapped plot.

axis_visible = Bool(True)

Is there a visible axis on the colorbar?

bgcolor = "transparent"

Overrides the default background color trait in PlotComponent.

border_visible = True

The border is visible (overrides enable.Component).

color_mapper = Property  # Instance(ColorMapper)

Screen mapper for color data

direction = Enum("normal", "flipped")

Should the bar go left-to-right or bottom-to-top (normal) or the reverse?

grid_visible = Bool(True)

Is there a visible grid on the colorbar?

index = Property

Optional index data source for generic tools to attach metadata to.

index_mapper = Instance(AbstractMapper)

Screen mapper for index data.

orientation = Enum("v", "h")

The orientation of the index axis.

origin = Enum("bottom left", "top left", "bottom right", "top right")

Faux origin for the axis to look at

plot = Any

Optional color-mapped plot that this color bar references. If specified, the plot must have a color_mapper attribute.

value_mapper = Property(observe="color_mapper")

Screen mapper for value data (synonym for color_mapper)

width = 40

Default width is 40 pixels (overrides enable.CoordinateBox)

x_mapper = Property

Corresponds to either index_mapper or None, depending on the orientation of the plot.

y_mapper = Property

Corresponds to either index_mapper or None, depending on the orientation of the plot.