chaco.tools.traits_tool module

Defines the TraitsTool and Fifo classes, and get_nested_components90 function.

class chaco.tools.traits_tool.Fifo

Bases: object

Slightly-modified version of the Fifo class from the Python cookbook: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/68436

append(value)
extend(values)
isempty()
pop()
class chaco.tools.traits_tool.TraitsTool(component=None, **traits)

Bases: enable.base_tool.BaseTool

Tool to edit the traits of plots, grids, and axes.

classes = List([PlotAxis, ColorBar])

The classes of components that should trigger a traits view

draw_mode = "none"

This tool does not have a visual representation (overrides BaseTool).

event = Str("left_dclick")

The event to trigger the edit on

views = Dict

A dict of Class : View providing alternate views for a particular component

visible = False

This tool is not visible (overrides BaseTool).

chaco.tools.traits_tool.get_nested_components(container, classes)

Returns a list of fundamental plotting components from a container with nested containers.

Performs a breadth-first search of the containment hierarchy. Each element in the returned list is a tuple (component, (x,y)) where (x,y) is the coordinate frame offset of the component from the top-level container.