com.approximatrix.charting.coordsystem.ticklocator
Class NumericYTickLocator

java.lang.Object
  extended by com.approximatrix.charting.coordsystem.ticklocator.NumericTickLocator
      extended by com.approximatrix.charting.coordsystem.ticklocator.NumericYTickLocator

public class NumericYTickLocator
extends NumericTickLocator

Extended class to locate and return a transformable vector of x,y pairs for locating tick marks on a y axis (vertical).

Author:
armstrong

Constructor Summary
NumericYTickLocator(double max, double min, int numTicsDesired, int maxTics)
          Pass-through constructor to constructs a numeric tick locator based on maximum and minimum values.
NumericYTickLocator(double max, double min, int numTicsDesired, int maxTics, boolean force_simple)
          Pass-through constructor to constructs a numeric tick locator based on maximum and minimum values.
 
Method Summary
 double[] getTickMarkLocationsAsPairs(double x)
          Returns an array of x,y pairs.
 
Methods inherited from class com.approximatrix.charting.coordsystem.ticklocator.NumericTickLocator
getTickMarkLocations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumericYTickLocator

public NumericYTickLocator(double max,
                           double min,
                           int numTicsDesired,
                           int maxTics)
Pass-through constructor to constructs a numeric tick locator based on maximum and minimum values.

Parameters:
max - the largest value to be plotted
min - the smallest value to be plotted
numTicsDesired - the approximate desired number of tick marks
maxTics - the most allowed ticks

NumericYTickLocator

public NumericYTickLocator(double max,
                           double min,
                           int numTicsDesired,
                           int maxTics,
                           boolean force_simple)
Pass-through constructor to constructs a numeric tick locator based on maximum and minimum values. Allows one to specify using a simple locator, spacing ticks equally between max and min values.

Parameters:
max - the largest value to be plotted
min - the smallest value to be plotted
numTicsDesired - the approximate desired number of tick marks
maxTics - the most allowed ticks
force_simple - true to force the locator to create exactly numTicsDesired starting with min and ending with max
Method Detail

getTickMarkLocationsAsPairs

public double[] getTickMarkLocationsAsPairs(double x)
Returns an array of x,y pairs. The y value contains a y tick location, while all the x values contain the passed value.

Parameters:
x - the value to use for y in the x,y pairs
Returns:
a vector of x,y pairs ready for use in an AffineTransform