Adds a plot area to the Chart visualizer. Defaults to a bar chart, but can be set to any subclass of ChartPlot
. See the individual plot visualizers (TimeSeriesPlot
, AgentsPlot
, BarChart
) for the arguments that can be passed through kwargs.
Parameters
name — str, required
A unique slug-type string used to refer to the plot in other functions.
label — str, required
The name of the plot displayed at the top of the plot.
type — str, optional
The type of plot to create. By default can be
'bar'
or'network'
, but can also take thetype
property of anyChartPlot
subclass that has been added withCharts.addPlotType()
.Default value: 'bar'
position — int, optional
The position in which to insert the plot in the control panel list. By default the plot is appended to the end of the list. NOTE: Position is calculated as of the function call. If two plots are called with position 3 for example, the second will push the first to position 4.
Default value: None
selected — bool, optional
Whether the plot should be selected by default when the control panel launches.
Default value: True
**kwargs — optional
Optional arguments to be passed to the plot class upon init.
Default value: {}
Return Value — ChartPlot
The ChartPlot
subclass object, depending on the type
parameter, with the newly created plot.
Notes and Examples