Package smile.plot.swing
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 TypeMethodDescriptioncanvas()Returns a canvas of the plot.double[]Returns the lower bound of data.double[]Returns the upper bound of data.legends()Returns the optional name of shape, which will be used to draw a legend outside the box.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
Constructor. -
LinePlot
Constructor.
-
-
Method Details
-
legends
Description copied from class:PlotReturns the optional name of shape, which will be used to draw a legend outside the box. -
canvas
Description copied from class:PlotReturns a canvas of the plot. -
getLowerBound
public double[] getLowerBound()Description copied from class:PlotReturns the lower bound of data.- Specified by:
getLowerBoundin classPlot
-
getUpperBound
public double[] getUpperBound()Description copied from class:PlotReturns the upper bound of data.- Specified by:
getUpperBoundin classPlot
-
paint
Description copied from class:ShapeDraws the shape. -
of
Creates a line plot. -
of
Creates a line plot. -
of
Creates a line plot. -
of
Creates a line plot. -
of
Creates a 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.
-
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.
-
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.
-
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.
-
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.
-