Defines the PlotComponent class.
PlotComponent is the base class for all plot-related visual components. It defines the various methods related to layout and tool handling, which virtually every subclass uses or needs to be aware of.
Several of these top-level layout and draw methods have implementations that must not be overridden; instead, subclasses implement various protected stub methods.
Additionally, this class sets up the machinery for having changes to specific traits trigger a call to the invalidate_and_redraw method (defined on the Component base class). To use this, simply set the metadata requires_redraw=True in the definition of the trait.
The default draw layer for Chaco plot components is the “plot” layer
draw_order= Instance(list, args=(DEFAULT_DRAWING_ORDER,))¶
The order in which various rendering classes on this component are drawn. Note that if this component is placed in a container, in most cases the container’s draw order is used, since the container calls each of its contained components for each rendering pass. Typically, the definitions of the layers are:
‘background’: Background image, shading
‘image’: A special layer for plots that render as images. This is in a separate layer since these plots must all render before non-image plots.
‘underlay’: Axes and grids
‘plot’: The main plot area itself
‘selection’: Selected content are rendered above normal plot elements to make them stand out
‘border’: Plot borders
‘annotation’: Lines and text that are conceptually part of the “plot” but need to be rendered on top of everything else in the plot
‘overlay’: Legends, selection regions, and other tool-drawn visual elements