Scatter Plot
A Callable for generating a scatter plot.
Definition
- class controller.callable.outputter.ScatterPlot(self, x: ColumnReference, y: ColumnReference, title: str, x_axis_name: str, y_axis_name: str)
- Callable name:
scatter_plot- Callable type:
- Parameters:
x (ColumnReference) – A column reference to find values for the x-axis.
y (ColumnReference) – A column reference to find values for the y-axis.
title (str) – The title of the plot.
x_axis_name (str) – The name of the x-axis.
y_axis_name (str) – The name of the y-axis.
Parameters
- x
A column reference to find values for the x-axis.
- Type:
- Required:
True
- Choices:
All columns in the target DataFrame
- y
A column reference to find values for the y-axis.
- Type:
- Required:
True
- Choices:
All columns in the target DataFrame
Output
A DataFrame is returned where it contains two columns matching the output conventions of an Outputter.
The
datacolumn contains the generated scatter chart in PNG format.The
typecolumn indicates the data type to beimage/png.
Example configuration
{
"name": "foo",
"callable": "scatter_chart",
"params": {
"x": "$final_exam_means.course_year_numeric",
"y": "$final_exam_means.means",
"title": "Final Exam Means",
"x_axis_name": "Year",
"y_axis_name": "Mean"
}
}