Class Axes2D


  • public class Axes2D
    extends Model
    Create an x and y axis in the xy-plane, along with "tick marks".
    • Constructor Summary

      Constructors 
      Constructor Description
      Axes2D()
      Create an x and y axis from -1 to +1 on each axis.
      Axes2D​(double xMin, double xMax, double yMin, double yMax, int xMarks, int yMarks)
      Create an x-axis from xMin to xMax and a y-axis from yMin to yMax.
      Axes2D​(double xMin, double xMax, double yMin, double yMax, int xMarks, int yMarks, Color c)
      Create an x-axis from xMin to xMax and a y-axis from yMin to yMax.
      Axes2D​(double xMin, double xMax, double yMin, double yMax, int xMarks, int yMarks, Color cX, Color cY)
      Create an x-axis from xMin to xMax and a y-axis from yMin to yMax.
      Axes2D​(double xMin, double xMax, double yMin, double yMax, int xMarks, int yMarks, Color cX, Color cY, double z)
      Create an x-axis from xMin to xMax and a y-axis from yMin to yMax.
    • Constructor Detail

      • Axes2D

        public Axes2D()
        Create an x and y axis from -1 to +1 on each axis. The default Color is white.
      • Axes2D

        public Axes2D​(double xMin,
                      double xMax,
                      double yMin,
                      double yMax,
                      int xMarks,
                      int yMarks)
        Create an x-axis from xMin to xMax and a y-axis from yMin to yMax. The default Color is white.
        Parameters:
        xMin - left end point for the x-axis
        xMax - right end point for the x-axis
        yMin - bottom end point for the y-axis
        yMax - top end point for the y-axis
        xMarks - number of evenly spaced tick marks on the x-axis
        yMarks - number of evenly spaced tick marks on the y-axis
      • Axes2D

        public Axes2D​(double xMin,
                      double xMax,
                      double yMin,
                      double yMax,
                      int xMarks,
                      int yMarks,
                      Color c)
        Create an x-axis from xMin to xMax and a y-axis from yMin to yMax. Use the given Color for both axes.
        Parameters:
        xMin - left end point for the x-axis
        xMax - right end point for the x-axis
        yMin - bottom end point for the y-axis
        yMax - top end point for the y-axis
        xMarks - number of evenly spaced tick marks on the x-axis
        yMarks - number of evenly spaced tick marks on the y-axis
        c - Color for both axes
      • Axes2D

        public Axes2D​(double xMin,
                      double xMax,
                      double yMin,
                      double yMax,
                      int xMarks,
                      int yMarks,
                      Color cX,
                      Color cY)
        Create an x-axis from xMin to xMax and a y-axis from yMin to yMax. Use the given Color for each axis.
        Parameters:
        xMin - left end point for the x-axis
        xMax - right end point for the x-axis
        yMin - bottom end point for the y-axis
        yMax - top end point for the y-axis
        xMarks - number of evenly spaced tick marks on the x-axis
        yMarks - number of evenly spaced tick marks on the y-axis
        cX - Color for the x-axis
        cY - Color for the y-axis
      • Axes2D

        public Axes2D​(double xMin,
                      double xMax,
                      double yMin,
                      double yMax,
                      int xMarks,
                      int yMarks,
                      Color cX,
                      Color cY,
                      double z)
        Create an x-axis from xMin to xMax and a y-axis from yMin to yMax. Use the given Color for each axis.

        The z parameter is so that we can put the axis just above or just below the xy-plane (say z=0.01 or z=-0.01). This way, the axes can be just in front of or just behind whatever is being drawn in the xy-plane.

        Parameters:
        xMin - left end point for the x-axis
        xMax - right end point for the x-axis
        yMin - bottom end point for the y-axis
        yMax - top end point for the y-axis
        xMarks - number of evenly spaced tick marks on the x-axis
        yMarks - number of evenly spaced tick marks on the y-axis
        cX - Color for the x-axis
        cY - Color for the y-axis
        z - offset of the axes away from the xy-plane