code: public static PlotCanvas plot(double[][] z, Color[] palette) {
          double[] lowerBound = {0, 0, Math.min(z)};
          double[] upperBound = {z.length, z[0].length, Math.max(z)};
  
          PlotCanvas canvas = new PlotCanvas(lowerBound, upperBound);
  
          Surface surface = new Surface(z, palette);
          canvas.add(surface);
  
          return canvas;
      }
docs: Create a plot canvas with the 3D surface plot of given data.
  @param z the z-axis values of surface. The x-axis and y-axis location of
  surface will be set to 0.5, 1.5, 2.5, ...
  @param palette the color palette.