chaco.plots.barplot module¶
Defines the BarPlot class.
-
class
chaco.plots.barplot.BarPlot(*args, **kw)¶ Bases:
chaco.abstract_plot_renderer.AbstractPlotRendererA renderer for bar charts.
-
alpha= Range(0.0, 1.0, 1.0, requires_redraw=True)¶ Overall alpha value of the image. Ranges from 0.0 for transparent to 1.0
-
antialias= Bool(True)¶ Round on rectangle dimensions? This is not strictly an “antialias”, but it has the same effect through exact pixel drawing.
-
bar_width= Float(10)¶ Width of the bars, in data or screen space (determined by bar_width_type).
-
bar_width_type= Enum("data", "screen")¶ Type of width used for bars:
- ‘data’
The width is in the units along the x-dimension of the data space.
- ‘screen’
The width uses a fixed width of pixels.
-
effective_fill_color= Property(Tuple, observe=["fill_color", "alpha"])¶ The RGBA tuple for rendering the fill. It is always a tuple of length 4. It has the same RGB values as
fill_color, and its alpha value is the alpha value of self.fill_color multiplied by self.alpha.
-
effective_line_color= Property(Tuple, observe=["line_color", "alpha"])¶ The RGBA tuple for rendering lines. It is always a tuple of length 4. It has the same RGB values as
line_color, and its alpha value is the alpha value of self.line_color multiplied by self.alpha.
-
fill_color= black_color_trait(requires_redraw=True)¶ Color to fill the bars.
-
index= Instance(ArrayDataSource)¶ The data source to use for the index coordinate.
-
index_direction= Enum("normal", "flipped")¶ The direction of the index axis with respect to the graphics context’s direction.
-
index_mapper= Instance(AbstractMapper)¶ Labels for the indices.
-
index_range= Property¶ Convenience property for accessing the index data range.
-
line_color= black_color_trait(requires_redraw=True)¶ Color of the border of the bars.
-
line_width= Float(1.0, requires_redraw=True)¶ Width of the border of the bars.
-
map_data(screen_pt)¶ Maps a screen space point into the “index” space of the plot.
Implements the AbstractPlotRenderer interface.
-
map_index(screen_pt, threshold=2.0, outside_returns_none=True, index_only=False)¶ Maps a screen space point to an index into the plot’s index array(s).
Implements the AbstractPlotRenderer interface.
-
map_screen(data_array)¶ Maps an array of data points into screen space and returns it as an array.
Implements the AbstractPlotRenderer interface.
-
orientation= Enum("h", "v")¶ The orientation of the index axis.
-
starting_value= Instance(ArrayDataSource)¶ The data source to use as “starting” values for bars (along value axis). For instance, if the values are [10, 20] and starting_value is [3, 7], BarPlot will plot two bars, one between 3 and 10, and one between 7 and 20
-
value= Instance(ArrayDataSource)¶ The data source to use as value points.
-
value_direction= Enum("normal", "flipped")¶ The direction of the value axis with respect to the graphics context’s direction.
-
value_mapper= Instance(AbstractMapper)¶ Labels for the values.
-
value_range= Property¶ Convenience property for accessing the value data range.
-
x_direction= Property¶ Corresponds to either index_direction or value_direction, depending on the orientation of the plot.
-
x_mapper= Property¶ Corresponds to either index_mapper or value_mapper, depending on the orientation of the plot.
-
y_direction= Property¶ Corresponds to either value_direction or index_direction, depending on the orientation of the plot
-
y_mapper= Property¶ Corresponds to either value_mapper or index_mapper, depending on the orientation of the plot.
-