chaco.plots.scatterplot module¶
Defines the ScatterPlot class, and associated TraitsUI view and helper function.
-
class
chaco.plots.scatterplot.
ScatterPlot
(**kwtraits)¶ Bases:
chaco.base_xy_plot.BaseXYPlot
Renders a scatter plot, given an index and value arrays.
-
map_data
(screen_pt, all_values=True)¶ Maps a screen space point into the “index” space of the plot.
Overrides the BaseXYPlot implementation, and always returns an array of (index, value) tuples.
-
map_index
(screen_pt, threshold=0.0, outside_returns_none=True, index_only=False)¶ Maps a screen space point to an index into the plot’s index array(s).
Overrides the BaseXYPlot implementation..
-
map_screen
(data_array)¶ Maps an array of data points into screen space and returns it as an array.
Implements the AbstractPlotRenderer interface.
-
-
class
chaco.plots.scatterplot.
ScatterPlotView
¶ Bases:
traitsui.view.View
TraitsUI View for customizing a scatter plot.
-
chaco.plots.scatterplot.
render_markers
(gc, points, marker, marker_size, color, line_width, outline_color, custom_symbol=None, debug=False, point_mask=None)¶ Helper function for a PlotComponent instance to render a set of (x,y) points onto a graphics context. Currently, it makes some assumptions about the attributes on the plot object; these may be factored out eventually.
- Parameters
gc (GraphicsContext) – The target for rendering the points
points (array of (x,y) points) – The points to render
marker (string, class, or instance) – The type of marker to use for the points
marker_size (number) – The size of the markers
color (RGB(A) color) – The color of the markers
line_width (number) – The width, in pixels, of the marker outline
outline_color (RGB(A) color) – The color of the marker outline
custom_symbol (CompiledPath) – If the marker style is ‘custom’, this is the symbol
point_mask (array of bools) – The mask specifying which points need to be rendered. The points array is already masked