code: public ScatterPlot points(String id, double[][] data, Color color) {
          if (data[0].length != base.dimension) {
              throw new IllegalArgumentException("Invalid data dimension: " + data[0].length);
          }
  
          double[] lowerBound = Math.colMin(data);
          double[] upperBound = Math.colMax(data);
          extendBound(lowerBound, upperBound);
  
          ScatterPlot plot = new ScatterPlot(data);
          plot.setID(id);
          plot.setColor(color);
          add(plot);
  
          return plot;
      }
docs: Adds a scatter plot to this canvas.
  @param id the id of the plot.
  @param data a n-by-2 or n-by-3 matrix that describes coordinates of points.
  @param color the color used to draw points.
  @return the scatter plot for the given points.