Reference 〉Class

Graph( dict{str: Plot} listOfPlots )

The Graph class is an interface between Helipad and Matplotlib that manages drawing model data to screen during runtime. It should not be initialized by user code; it is initialized at model start and stored in GUI.graph.

Initialization Parameters

  • listOfPlots dict{str: Plot}, required

    A list of the active plots, selected in the control panel, to be drawn on the graph. The Plot object is created in model.addPlot().


Click a method name for more detailed documentation.

  • toggleLine( event )

    Toggles a series on or off. This function is called when a series name is clicked in the legend of a plot.

  • update( data )

    Updates the graph area with new data. This function should not be called by the user; call GUI.step() instead to increment the model by one period and update the graph.


  • resolution int

    The time elapsing between any two data points drawn to screen (not the time elapsing between two updates, which is a user-controlled parameter). resolution increases by 10× at period 2,500, 25,000, 250,000, etc.

    Initial value: 1

  • fig matplotlib.Figure

    The Matplotlib Figure object used for rendering the graph.

  • plots dict{str:Plot}

    A dict of the visible Plot objects, in which the various Matplotlib objects are stored.

Notes and Examples

  1. Contribute a Note

    Your email address will not be published. Required fields are marked *

    You may use limited HTML for formatting. Please embed blocks of code in <pre><code> </code></pre> tags.