Package jcckit.plot

Class AxisParameters

java.lang.Object
jcckit.plot.AxisParameters

public class AxisParameters extends Object
Helper class with various parameters defining an axis. This helper class is used by CartesianCoordinateSystem to set up a coordinate systems.

This class holds more than a dozen parameters. There are two factory methods creating instances for x- and y-axis based on ConfigParameters. They differ in their default parameters for those axes.

Note, that there is a direct access of these parameters without getters and setters but only for classes in the package jcckit.plot.

  • Field Details

  • Constructor Details

    • AxisParameters

      public AxisParameters()
  • Method Details

    • createXAxis

      public static AxisParameters createXAxis(ConfigParameters config)
      Creates an x axis based on the specified configuration parameters. All numbers (lengths, fontsizes, linethicknesses, etc.) are in device-independent units.
      Key & Default ValueTypeMandatory Description
      automaticTicCalculation = true booleanno Has to be true if the tics should be calculated automatically.
      axisAttributes = default values of ShapeAttributes ConfigParametersno Attributes of the axis box.
      axisLabel = x Stringno Axis label.
      axisLabelAttributes = default values of BasicGraphicAttributes with a text anchor CENTER TOP. ConfigParametersno Text attributes of axis label.
      axisLabelPosition = 0 -0.05 double[]no Position of the anchor of the axis label relative to the center of the x-axis line.
      axisLength = 0.8 doubleno Length of the x-axis.
      grid = false booleanno If true grid lines will be drawn through the axis tics.
      gridAttributes = default values of ShapeAttributes ConfigParametersno Attributes of the grid lines.
      logScale = false booleanno If true the axis will be logarithmic. Otherwise the axis is linear.
      maximum = 1 doubleno The corresponding data value of one end of the axis.
      maximumTic = result from automatic calculation doubleno The corresponding data value of the tic nearest the maximum end of the axis.
      minimum = 0 doubleno The corresponding data value of one end of the axis.
      minimumTic = result from automatic calculation doubleno The corresponding data value of the tic nearest the minimum end of the axis.
      numberOfTics = result from automatic calculation intno Number of tics. The tics between the minimum and maximum tic are spaced equidistantly.
      ticAttributes = default values of ShapeAttributes ConfigParametersno Attributes of the tics.
      ticLabelAttributes = default values of BasicGraphicAttributes with a text anchor CENTER TOP. ConfigParametersno Text attributes of tic labels.
      ticLabelFormat = %1.1f String or ConfigParametersno Defines rendering of the tic label. By default a printf-like format string is given (see Format). Note, that an empty string means that tic labels are dropped.

      For non-numerical rendering an implementation of a TicLabelFormat can be specified (e.g. TicLabelMap). Note, that a configuration sub tree with a className key-value pair overwrites any string definition.

      ticLabelPosition = 0 -0.01 double[]no Position of the anchor of the tic label relative to the tic position on the axis.
      ticLength = 0.01 doubleno Length of the tics. Negative/positive values mean tics inside/outside the box.
    • createYAxis

      public static AxisParameters createYAxis(ConfigParameters config)
      Creates an y axis based on the specified configuration parameters. All numbers (lengths, fontsizes, linethicknesses, etc.) are in device-independent units.
      Key & Default ValueTypeMandatory Description
      automaticTicCalculation = true booleanno Has to be true if the tics should be calculated automatically.
      axisAttributes = default values of ShapeAttributes ConfigParametersno Attributes of the axis box.
      axisLabel = y Stringno Axis label.
      axisLabelAttributes = default values of BasicGraphicAttributes with a text anchor CENTER BOTTOM and the text rotated by 90 degree. ConfigParametersno Text attributes of axis label.
      axisLabelPosition = -0.1 0 double[]no Position of the anchor of the axis label relative to the center of the y-axis line.
      axisLength = 0.45 doubleno Length of the y-axis.
      grid = false booleanno If true grid lines will be drawn through the axis tics.
      gridAttributes = default values of ShapeAttributes ConfigParametersno Attributes of the grid lines.
      logScale = false booleanno If true the axis will be logarithmic. Otherwise the axis is linear.
      maximum = 1 doubleno The corresponding data value of one end of the axis.
      maximumTic = result from automatic calculation doubleno The corresponding data value of the tic nearest the maximum end of the axis.
      minimum = 0 doubleno The corresponding data value of one end of the axis.
      minimumTic = result from automatic calculation doubleno The corresponding data value of the tic nearest the minimum end of the axis.
      numberOfTics = result from automatic calculation intno Number of tics. The tics between the minimum and maximum tic are spaced equidistantly.
      ticAttributes = default values of ShapeAttributes ConfigParametersno Attributes of the tics.
      ticLabelAttributes = default values of BasicGraphicAttributes with a text anchor RIGHT CENTER. ConfigParametersno Text attributes of tic labels.
      ticLabelFormat = %1.1f Stringno Defines rendering of the tic label. By default a printf-like format string is given (see Format). Note, that an empty string means that tic labels are dropped.

      For non-numerical rendering an implementation of a TicLabelFormat can be specified (e.g. TicLabelMap). Note, that a configuration sub tree with a className key-value pair overwrites any string definition.

      ticLabelPosition = -0.01 0 double[]no Position of the anchor of the tic label relative to the tic position on the axis.
      ticLength = 0.01 doubleno Length of the tics. Negative/positive values mean tics inside/outside the box.