axes object for display on the visualizer. This function is called after
ChartPlot.update() when the visualizer receives new data, and when scrubbing the time bar. The
update() method, therefore, should be used to store model data by time, which can then be used by
Charts will refresh the entire canvas after updating each of the individual plots, so there is no need to refresh the canvas manually here unless it is desired to redraw the graph out of sync (e.g. if the subclass provides for interactivity and the plot should update while the model is paused).
Subclasses should call
super().draw(t, forceUpdate) at the end of the function.
t — int, required
The model time whose data to draw. Because the
Chartsvisualizer disables the
refreshparameter on runtime,
Chartswill never pass a value of
draw()that has not already been passed to
update(), where the data should be stored in the object.
forceUpdate — bool, optional
Chartsrefreshes all the plots at once each cycle. If interacting with a plot while the model is paused and it becomes necessary to update the display,
forceUpdatecan be used to refresh the display before the next cycle. Note that the plot's data must be updated with the
Default value: False