GJDataVectors for xData and yData

Data for the for xData and yData properties in the data model for each plot are each represented by an instance of a class implementing the GJDataVectorInterface.

These instances are always:

  1. specific to one plot - they may not be shared
  2. specific to one axis

Each GJDataVectorInterface wraps a data buffer. This data buffer can be shared by reference between GJDataVectorInterfaces and therefore between plots (including plots that are displayed in different graphs, containers, frames etc.).

Methods are available to:

  1. get and set the data buffer by reference
  2. get the data wrapped by the buffer as a double[]. There are two methods for this:
    1. getDataValues - returns the data as a double[] after applying the transform associated with the axis for the plot's graph.
    2. getRawDataValues - returns the data as a double[] without applying the transform.
  3. getEntry(index) and setEntry(index, value) methods to get or set single elements
Fuller details of the methods are available in the JavaDoc.