API

agatecharts.patch()

Patch the features of this library onto agate’s core Table and TableSet.

agatecharts.table.DEFAULT_SIZE = (8, 8)

Default rendered chart size in inches

agatecharts.table.DEFAULT_DPI = 72

Default rendered chart dpi

class agatecharts.table.TableCharts
bar_chart(label_column_name, value_column_names, filename=None, size=(8, 8), dpi=72)

Plots a bar chart.

See TableCharts._plot() for an explanation of keyword arguments.

Parameters:
  • label_column_name – The name of a column in the source to be used for the vertical axis labels. Must refer to a column containing Text, Number or Date data.
  • value_column_names – One or more column names in the source, each of which will used to define the horizontal width of a bar. Must refer to a column containing Number data.
column_chart(label_column_name, value_column_names, filename=None, size=(8, 8), dpi=72)

Plots a column chart.

See TableCharts._plot() for an explanation of keyword arguments.

Parameters:
  • label_column_name – The name of a column in the source to be used for the horizontal axis labels. Must refer to a column containing Text, Number or Date data.
  • value_column_names – One or more column names in the source, each of which will used to define the vertical height of a bar. Must refer to a column containing Number data.
line_chart(x_column_name, y_column_names, filename=None, size=(8, 8), dpi=72)

Plots a line chart.

See TableCharts._plot() for an explanation of keyword arguments.

Parameters:
  • x_column_name – The name of a column in the source to be used for the horizontal axis. May refer to a column containing Number, Date or DateTime data.
  • y_column_names – A sequence of column names in the source, each of which will be used for the vertical axis. Must refer to a column with Number data.
scatter_chart(x_column_name, y_column_name, filename=None, size=(8, 8), dpi=72)

Plots a scatter plot.

See TableCharts._plot() for an explanation of keyword arguments.

Parameters:
  • x_column_name – Column containing X values for the points to plot. Must refer to a column containg Number data.
  • y_column_name – Column containing Y values for the points to plot. Must refer to a column containg Number data.
_plot(chart, filename=None, size=(8, 8), dpi=72)

Execute a plot of this Table.

This method should not be called directly by the user.

Parameters:
  • chart – An chart class to render.
  • filename – A filename to render to. If not specified will render to screen in “interactive mode”.
  • size – A (width, height) tuple in inches defining the size of the canvas to render to.
  • dpi – A number defining the pixels-per-inch to render.
agatecharts.tableset.DEFAULT_MULTIPLE_SIZE = (4, 4)

Default small multiple chart size in inches

class agatecharts.tableset.TableSetCharts
bar_chart(label_column_name, value_column_names, filename=None, size=None, dpi=72)

See TableCharts.bar_chart().

column_chart(label_column_name, value_column_names, filename=None, size=None, dpi=72)

See TableCharts.column_chart().

line_chart(x_column_name, y_column_names, filename=None, size=None, dpi=72)

See TableCharts.line_chart().

scatter_chart(x_column_name, y_column_name, filename=None, size=None, dpi=72)

See TableCharts.scatter_chart().

_plot(chart, filename=None, size=None, dpi=72)

See TableCharts._plot().