The plot model

The common model for all plots has two parts:
  1. The data model - representing the data to be displayed
  2. The visual model - representing how the data will be displayed
The distinction between the data and visual components of the model is not absolute e.g. while the visual component normally describes the size of markers to be used in a scatter plot, the size might be varied in a specific plot's paint methods according to the values stored in the data model.

In addition, settings for the visual model determine whether the data are interpreted as multiplexed or not (as described here). The data model represents data as a vector. If the data are multiplexed, the vectors will be treated as an interleaved data series with the number of series in the dataset determined by the settings in the visual model.

The plot model is added to a plot during its construction. There is no need to create one explicitly. The models are specified as properties of the GJAbstractPlotModelImpl class which is extended by the GJAbstractPlot class.