Axis transforms

Transforms of data represented in a plot is supported at the level of the graph that displays the plot, rather than by the plot itself.

All plots in a single graph share a common pair of axes, and transforms associated with those axes (recall that graphs can be superimposed by addition when multiple axes are needed - see here).

All transform classes implement the GJTransformInterface and serve both:

  1. to transform the data
  2. to format labels and tick marks for the axes they control
The role in formating the labels means that Waterloo provides several transform classes:
  • NOPTransform - linear axes
  • LogTransform - natural logs
  • Log10Transform - base 10 log
  • Log2Transform - base 2 log
  • PTransform - -log10

Formating of labels

Each of the concrete classes implementing the GJTransformInterface have a java.text.NumberFormat instance (specified in the GJAbstractDataTransform class) that is used to format numeric labels. Numeric labelling can be customised through this NumberFormat.

In additon, all classes implementing the GJDataVectorInterface for the xData and yData can associate categorical labels with specific numeric values. When categorical labels are present, the associated strings will be displayed instead of the numeric labels.