Class LinePlot
java.lang.Object
smile.plot.swing.Shape
smile.plot.swing.Plot
smile.plot.swing.LinePlot
Line plot is a special scatter plot which connects points by straight lines.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfigure()Returns a figure containing the plot.double[]Returns the lower bound of data.double[]Returns the upper bound of data.legends()Returns the optional legend of shape.static LinePlotof(double[] y) Creates a line plot with the index as the x coordinate.static LinePlotof(double[][] data) Creates a line plot.static LinePlotCreates a line plot.static LinePlotof(double[][] data, Line.Style style) Creates a line plot.static LinePlotof(double[][] data, Line.Style style, Color color) Creates a line plot.static LinePlotof(double[][] data, Line.Style style, Color color, String label) Creates a line plot.static LinePlotCreates a line plot with the index as the x coordinate.static LinePlotof(double[] y, Line.Style style) Creates a line plot with the index as the x coordinate.static LinePlotof(double[] y, Line.Style style, Color color) Creates a line plot with the index as the x coordinate.static LinePlotof(double[] y, Line.Style style, Color color, String label) Creates a line plot with the index as the x coordinate.voidDraws the shape.
-
Constructor Details
-
LinePlot
-
LinePlot
-
-
Method Details
-
legends
-
figure
-
getLowerBound
public double[] getLowerBound()Description copied from class:PlotReturns the lower bound of data.- Specified by:
getLowerBoundin classPlot- Returns:
- the lower bound of data.
-
getUpperBound
public double[] getUpperBound()Description copied from class:PlotReturns the upper bound of data.- Specified by:
getUpperBoundin classPlot- Returns:
- the upper bound of data.
-
paint
-
of
Creates a line plot.- Parameters:
data- the lines.- Returns:
- the line plot.
-
of
Creates a line plot.- Parameters:
data- the lines.style- the line style.- Returns:
- the line plot.
-
of
-
of
Creates a line plot.- Parameters:
data- the lines.style- the line style.color- the line color.- Returns:
- the line plot.
-
of
Creates a line plot.- Parameters:
data- the lines.style- the line style.color- the line color.label- the line legend.- Returns:
- the line plot.
-
of
Creates a line plot with the index as the x coordinate.- Parameters:
y- the data vector of y coordinates. The x coordinates will be [0, n), where n is the length of y.- Returns:
- the line plot.
-
of
Creates a line plot with the index as the x coordinate.- Parameters:
y- the data vector of y coordinates. The x coordinates will be [0, n), where n is the length of y.style- the line style.- Returns:
- the line plot.
-
of
-
of
Creates a line plot with the index as the x coordinate.- Parameters:
y- the data vector of y coordinates. The x coordinates will be [0, n), where n is the length of y.style- the line style.color- the line color.- Returns:
- the line plot.
-
of
Creates a line plot with the index as the x coordinate.- Parameters:
y- the data vector of y coordinates. The x coordinates will be [0, n), where n is the length of y.style- the line style.color- the line color.label- the line legend.- Returns:
- the line plot.
-