Class NiceScale

java.lang.Object
cnuphys.splot.pdata.NiceScale

public class NiceScale extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    NiceScale(double min, double max, int numTicks, boolean includeZero)
    Instantiates a new instance of the NiceScale class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Get the nice plot max
    double
    Get the nice plot min
    int
    Get the number of ticks (including the ends)
    double
    Get the tick spacing
    void
    setMaxTicks(int maxTicks)
    Sets maximum number of tick marks we're comfortable with
    void
    setMinMaxPoints(double min, double max)
    Sets the minimum and maximum data points for the axis.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NiceScale

      public NiceScale(double min, double max, int numTicks, boolean includeZero)
      Instantiates a new instance of the NiceScale class.
      Parameters:
      min - the minimum data point on the axis
      max - the maximum data point on the axis
      numTicks - the number of ticks including the ends
  • Method Details

    • getTickSpacing

      public double getTickSpacing()
      Get the tick spacing
      Returns:
      the tick spacing
    • getNiceMin

      public double getNiceMin()
      Get the nice plot min
      Returns:
      the nice plot min
    • getNiceMax

      public double getNiceMax()
      Get the nice plot max
      Returns:
      the nice plot max
    • setMinMaxPoints

      public void setMinMaxPoints(double min, double max)
      Sets the minimum and maximum data points for the axis.
      Parameters:
      min - the minimum data point on the axis
      max - the maximum data point on the axis
    • setMaxTicks

      public void setMaxTicks(int maxTicks)
      Sets maximum number of tick marks we're comfortable with
      Parameters:
      maxTicks - the maximum number of tick marks for the axis
    • getNumTicks

      public int getNumTicks()
      Get the number of ticks (including the ends)
      Returns:
      the number of ticks