chaco.plot_factory module

Contains convenience functions to create ready-made PlotRenderer instances of various types.

chaco.plot_factory.add_default_axes(plot, orientation='normal', vtitle='', htitle='', axis_class=<class 'chaco.axis.PlotAxis'>)

Creates left and bottom axes for a plot. Assumes that the index is horizontal and value is vertical by default; set orientation to something other than “normal” if they are flipped.

chaco.plot_factory.add_default_grids(plot, orientation='normal')

Creates horizontal and vertical gridlines for a plot. Assumes that the index is horizontal and value is vertical by default; set orientation to something other than “normal” if they are flipped.

chaco.plot_factory.create_bar_plot(data=None, index_bounds=None, value_bounds=None, orientation='h', color='red', bar_width=10.0, value_mapper_class=<class 'chaco.linear_mapper.LinearMapper'>, line_color='black', fill_color='red', line_width=1, bgcolor='transparent', border_visible=False, antialias=True, add_grid=False, add_axis=False, **renderer_traits)

Creates a BarPlot renderer from a single Nx2 data array or a tuple of two length-N 1-D arrays. The data must be sorted on the index if any reverse-mapping tools are to be used.

Pre-existing “index” and “value” datasources can be passed in.

chaco.plot_factory.create_line_plot(data=None, index_bounds=None, value_bounds=None, orientation='h', color='red', width=1.0, dash='solid', value_mapper_class=<class 'chaco.linear_mapper.LinearMapper'>, bgcolor='transparent', border_visible=False, add_grid=False, add_axis=False, index_sort='none', **renderer_traits)

Creates a LinePlot renderer from a single Nx2 data array or a tuple of two length-N 1-D arrays. The data must be sorted on the index if any reverse-mapping tools are to be used.

Pre-existing “index” and “value” datasources can be passed in.

chaco.plot_factory.create_polar_plot(data, orientation='h', color='black', width=1.0, dash='solid', grid='dot', value_mapper_class=<class 'chaco.polar_mapper.PolarMapper'>, **renderer_traits)

Creates a polar plot renderer from a single Nx2 data array or a tuple of two length-N 1-D arrays. The data must be sorted on the index if any reverse-mapping tools are to be used.

Pre-existing “index” and “value” datasources can be passed in.

chaco.plot_factory.create_scatter_plot(data=None, index_bounds=None, value_bounds=None, orientation='h', color='green', marker='square', marker_size=4, bgcolor='transparent', outline_color='black', border_visible=True, add_grid=False, add_axis=False, index_sort='none', **renderer_traits)

Creates a ScatterPlot renderer from a single Nx2 data array or a tuple of two length-N 1-D arrays. The data must be sorted on the index if any reverse-mapping tools are to be used.

Pre-existing “index” and “value” datasources can be passed in.