code: protected PlotCanvas paintOnCanvas(double[][] data, int[] label) {
          PlotCanvas canvas = ScatterPlot.plot(data, pointLegend);
          for (int i = 0; i < data.length; i++) {
              canvas.point(pointLegend, Palette.COLORS[label[i]], data[i]);
          }
          return canvas;
      }
docs: paint given data with label on canvas
  @param data the data point(s) to paint, only support 2D or 3D features
  @param label the data label for classification