Class Grid


public class Grid extends Plot
A 2D grid plot.
  • Constructor Details

    • Grid

      public Grid(double[][][] data, Color color)
      Constructor.
      Parameters:
      data - an m x n x 2 array which are coordinates of m x n grid.
  • Method Details

    • paint

      public void paint(Graphics g)
      Description copied from class: Shape
      Draws the shape.
      Specified by:
      paint in class Shape
    • getLowerBound

      public double[] getLowerBound()
      Description copied from class: Plot
      Returns the lower bound of data.
      Specified by:
      getLowerBound in class Plot
    • getUpperBound

      public double[] getUpperBound()
      Description copied from class: Plot
      Returns the upper bound of data.
      Specified by:
      getUpperBound in class Plot
    • of

      public static Grid of(double[][][] data)
      Creates a grid with black lines.
      Parameters:
      data - an m x n x 2 array which are coordinates of m x n grid.