code: public StaircasePlot staircase(String id, double[][] data, Color color) {
          if (data[0].length != 2 && data[0].length != 3) {
              throw new IllegalArgumentException("Invalid data dimension: " + data[0].length);
          }
  
          StaircasePlot plot = new StaircasePlot(data);
          plot.setID(id);
          plot.setColor(color);
          add(plot);
          return plot;
      }
docs: Adds a staircase line plot to this canvas.
  @param id the id of the plot.
  @param data a n x 2 or n x 3 matrix that describes coordinates of points.
  @param color the color of line.