Class NiceScale

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

public class NiceScale extends Object
  • Constructor Summary Link icon

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

    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 Link icon

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

    • NiceScale Link icon

      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 Link icon

    • getTickSpacing Link icon

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

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

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

      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 Link icon

      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 Link icon

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