class_docstr: Grid of data.
class_docstr_tok: ["Grid","of","data","."]
code: def __init__(self, x, y):
      if x.ndim == 1:
          pass
      elif x.ndim == 2:
          x_row = x[0, :]
          if not np.allclose(x_row, x):
              raise ValueError("The rows of 'x' must be equal")
          x = x_row
      else:
          raise ValueError("'x' can have at maximum 2 dimensions")
  
      if y.ndim == 1:
          pass
      elif y.ndim == 2:
          y_col = y[:, 0]
          if not np.allclose(y_col, y.T):
              raise ValueError("The columns of 'y' must be equal")
          y = y_col
      else:
          raise ValueError("'y' can have at maximum 2 dimensions")
  
      self.nx = len(x)
      self.ny = len(y)
  
      self.dx = x[1] - x[0]
      self.dy = y[1] - y[0]
  
      self.x_origin = x[0]
      self.y_origin = y[0]
  
      self.width = x[-1] - x[0]
      self.height = y[-1] - y[0]
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  from six.moves import xrange
  import numpy
  import matplotlib
  import matplotlib.cm
  import matplotlib.colors
  import matplotlib.collections
  import matplotlib.lines
  import matplotlib.patches
label_desc: Use image node_id 1 to create a new Grid object from inherited base classes: object with example: obj = Grid(x, y)