Class myphysicslab.lab.graph.DisplayGraph

Provided By
All Implemented Interfaces

Displays one or more GraphLines. The GraphLines are drawn in the simulation coordinates of the containing LabView.

The screen rectangle that the DisplayGraph should occupy within the SimView must be set with #setScreenRect before drawing can be done.

Additional GraphLines can be shown in the DisplayGraph, see #addGraphLine.

The GraphLine can be drawn into an offscreen image, see #setUseBuffer. The default is to use an offscreen image; this saves time by not needing to redraw the entire graph every frame.


A change to a variable is either continuous or discontinuous. DisplayGraph doesn't draw a line at a point of discontinuity, but draws a dot instead. A discontinuity is indicated by incrementing the sequence number, see myphysicslab.lab.model.VarsList.

new DisplayGraph( opt_graphLine )


a GraphLine to display

Instance Methods

Instance Properties