Class Staircase

java.lang.Object
smile.plot.swing.Shape
smile.plot.swing.Staircase

public class Staircase extends Shape
This class represents a poly line in the plot.
  • Constructor Details

    • Staircase

      public Staircase(double[][] points, Color color)
      Constructor.
      Parameters:
      points - an n-by-2 or n-by-3 matrix that are the coordinates of points.
      color - the color of points.
  • Method Details

    • paint

      public void paint(Graphics g)
      Description copied from class: Shape
      Draws the shape.
      Specified by:
      paint in class Shape
    • of

      public static Staircase of(double[][] points)
      Creates a Staircase with solid stroke and black color.