public class LinePlot extends ScatterPlot
Constructor and Description |
---|
LinePlot(double[][] data)
Constructor.
|
LinePlot(double[][] data,
Line.Style style)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getColor()
Returns the color of component.
|
java.awt.Stroke |
getStroke()
Returns the line stroke style.
|
void |
paint(Graphics g)
Draw the component with given graphics object.
|
static PlotCanvas |
plot(double[] y)
Create a plot canvas with the poly line plot of given data.
|
static PlotCanvas |
plot(double[][] data,
Line.Style style)
Create a plot canvas with the poly line plot of given data.
|
static PlotCanvas |
plot(double[][] data,
Line.Style style,
java.awt.Color color)
Create a plot canvas with the poly line plot of given data.
|
static PlotCanvas |
plot(double[] y,
Line.Style style)
Create a plot canvas with the poly line plot of given data.
|
static PlotCanvas |
plot(double[] y,
Line.Style style,
java.awt.Color color)
Create a plot canvas with the poly line plot of given data.
|
static PlotCanvas |
plot(java.lang.String id,
double[] y)
Create a plot canvas with the poly line plot of given data.
|
static PlotCanvas |
plot(java.lang.String id,
double[][] data,
Line.Style style)
Create a plot canvas with the poly line plot of given data.
|
static PlotCanvas |
plot(java.lang.String id,
double[][] data,
Line.Style style,
java.awt.Color color)
Create a plot canvas with the poly line plot of given data.
|
static PlotCanvas |
plot(java.lang.String id,
double[] y,
Line.Style style)
Create a plot canvas with the poly line plot of given data.
|
static PlotCanvas |
plot(java.lang.String id,
double[] y,
Line.Style style,
java.awt.Color color)
Create a plot canvas with the poly line plot of given data.
|
LinePlot |
setColor(java.awt.Color color)
Set the color of component.
|
LinePlot |
setLegend(char legend)
Set the legend of points.
|
LinePlot |
setStroke(java.awt.Stroke stroke)
Set the line stroke style.
|
getLegend, plot, plot, plot, plot, plot, plot, plot, plot, plot, plot, plot, plot, plot, plot
getID, getToolBar, getToolTip, setID
public LinePlot(double[][] data)
public LinePlot(double[][] data, Line.Style style)
public LinePlot setColor(java.awt.Color color)
Shape
public java.awt.Color getColor()
Shape
public java.awt.Stroke getStroke()
public LinePlot setStroke(java.awt.Stroke stroke)
public LinePlot setLegend(char legend)
ScatterPlot
setLegend
in class ScatterPlot
public void paint(Graphics g)
Shape
paint
in class ScatterPlot
public static PlotCanvas plot(double[] y)
y
- a data vector that describes y coordinates of points. The x
coordinates will be [0, n), where n is the length of y.public static PlotCanvas plot(java.lang.String id, double[] y)
id
- the id of the plot.y
- a data vector that describes y coordinates of points. The x
coordinates will be [0, n), where n is the length of y.public static PlotCanvas plot(double[] y, Line.Style style)
y
- a data vector that describes y coordinates of points. The x
coordinates will be [0, n), where n is the length of y.style
- the stroke style of line.public static PlotCanvas plot(java.lang.String id, double[] y, Line.Style style)
id
- the id of the plot.y
- a data vector that describes y coordinates of points. The x
coordinates will be [0, n), where n is the length of y.style
- the stroke style of line.public static PlotCanvas plot(double[] y, Line.Style style, java.awt.Color color)
y
- a data vector that describes y coordinates of points. The x
coordinates will be [0, n), where n is the length of y.style
- the stroke style of line.color
- the color of line.public static PlotCanvas plot(java.lang.String id, double[] y, Line.Style style, java.awt.Color color)
id
- the id of the plot.y
- a data vector that describes y coordinates of points. The x
coordinates will be [0, n), where n is the length of y.style
- the stroke style of line.color
- the color of line.public static PlotCanvas plot(double[][] data, Line.Style style)
data
- a n-by-2 or n-by-3 matrix that describes coordinates of points.style
- the stroke style of line.public static PlotCanvas plot(java.lang.String id, double[][] data, Line.Style style)
id
- the id of the plot.data
- a n-by-2 or n-by-3 matrix that describes coordinates of points.style
- the stroke style of line.public static PlotCanvas plot(double[][] data, Line.Style style, java.awt.Color color)
data
- a n-by-2 or n-by-3 matrix that describes coordinates of points.style
- the stroke style of line.color
- the color of line.public static PlotCanvas plot(java.lang.String id, double[][] data, Line.Style style, java.awt.Color color)
id
- the id of the plot.data
- a n-by-2 or n-by-3 matrix that describes coordinates of points.style
- the stroke style of line.color
- the color of line.