Class StaircasePlot


public class StaircasePlot extends Plot
Staircase plot is a special case of line which is most useful to display empirical distribution.
  • Constructor Details

    • StaircasePlot

      public StaircasePlot(Staircase... lines)
      Constructor.
      Parameters:
      lines - the staircase lines.
    • StaircasePlot

      public StaircasePlot(Staircase[] lines, Legend[] legends)
      Constructor.
      Parameters:
      lines - the staircase lines.
      legends - the line legends.
  • Method Details

    • legends

      public Optional<Legend[]> legends()
      Description copied from class: Plot
      Returns the optional legend of shape.
      Overrides:
      legends in class Plot
      Returns:
      the optional legend of shape
    • figure

      public Figure figure()
      Description copied from class: Plot
      Returns a figure containing the plot.
      Overrides:
      figure in class Plot
      Returns:
      a figure containing the plot.
    • getLowerBound

      public double[] getLowerBound()
      Description copied from class: Plot
      Returns the lower bound of data.
      Specified by:
      getLowerBound in class Plot
      Returns:
      the lower bound of data.
    • getUpperBound

      public double[] getUpperBound()
      Description copied from class: Plot
      Returns the upper bound of data.
      Specified by:
      getUpperBound in class Plot
      Returns:
      the upper bound of data.
    • paint

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

      public static StaircasePlot of(double[][] data)
      Creates a line plot.
      Parameters:
      data - the point coordinates.
      Returns:
      the plot.
    • of

      public static StaircasePlot of(double[][] data, Color color, String label)
      Creates a line plot.
      Parameters:
      data - the point coordinates.
      color - the line color.
      label - the legend label.
      Returns:
      the plot.