code: public static PlotCanvas plot(double[][][] data) {
          double[] lowerBound = {data[0][0][0], data[0][0][1], data[0][0][2]};
          double[] upperBound = {data[0][0][0], data[0][0][1], data[0][0][2]};
          for (int i = 0; i < data.length; i++) {
              for (int j = 0; j < data[i].length; j++) {
                  if (data[i][j][0] < lowerBound[0]) {
                      lowerBound[0] = data[i][j][0];
                  }
                  if (data[i][j][0] > upperBound[0]) {
                      upperBound[0] = data[i][j][0];
                  }
                  if (data[i][j][1] < lowerBound[1]) {
                      lowerBound[1] = data[i][j][1];
                  }
                  if (data[i][j][1] > upperBound[1]) {
                      upperBound[1] = data[i][j][1];
                  }
                  if (data[i][j][2] < lowerBound[2]) {
                      lowerBound[2] = data[i][j][2];
                  }
                  if (data[i][j][2] > upperBound[2]) {
                      upperBound[2] = data[i][j][2];
                  }
              }
          }
  
          PlotCanvas canvas = new PlotCanvas(lowerBound, upperBound);
  
          Surface surface = new Surface(data);
          canvas.add(surface);
  
          return canvas;
      }
docs: Create a plot canvas with the 3D surface plot of given data.
  @param data an m x n x 3 array which are coordinates of m x n surface.