public class LinePlot extends Plot
Constructor and Description |
---|
LinePlot(double[] xs,
String xLabel,
String yLabel)
Creates a new LinePlot
|
LinePlot(double[] xs,
String xLabel,
String yLabel,
boolean hideLegend)
Creates a new LinePlot
|
LinePlot(int[] xs,
String xLabel,
String yLabel)
Creates a new LinePlot
|
LinePlot(int[] xs,
String xLabel,
String yLabel,
boolean hideLegend)
Creates a new LinePlot
|
Modifier and Type | Method and Description |
---|---|
LinePlot |
addSeries(String seriesName)
Adds a new empty series to the plot.
|
LinePlot |
addSeries(String seriesName,
double value)
Adds a new series to the plot initializing all the values to a constant one.
|
LinePlot |
addSeries(String seriesName,
double[] y)
Adds a new series to the plot. y values positions must be correlated with xs values.
|
protected String[][] |
getDataContent(String xAxisTicksFormat,
String yAxisTicksFormat)
Returns an String matrix with the content of the plot's data.
|
protected String[] |
getDataHeaders()
Returns an String array with the headers of the plot's data
|
protected de.erichseifert.gral.plots.AbstractPlot |
getGralPlot()
Gets an AbstractPlot using GRAL
|
LinePlot |
setValue(String seriesName,
double x,
double y)
Sets a single value of a series
|
LinePlot |
setValue(String seriesName,
int x,
double y)
Sets a single value of a series
|
draw, exportData, exportData, exportData, exportData, exportPlot, printData, printData, printData, toString, toString, toString
public LinePlot(int[] xs, String xLabel, String yLabel)
xs
- Values of the x axisxLabel
- Label of the x axisyLabel
- Label of the y axispublic LinePlot(int[] xs, String xLabel, String yLabel, boolean hideLegend)
xs
- Values of the x axisxLabel
- Label of the x axisyLabel
- Label of the y axishideLegend
- Indicates if the legend must be hidden. False by default.public LinePlot(double[] xs, String xLabel, String yLabel)
xs
- Values of the x axisxLabel
- Label of the x axisyLabel
- Label of the y axispublic LinePlot addSeries(String seriesName)
seriesName
- Series namepublic LinePlot addSeries(String seriesName, double value)
seriesName
- Series namevalue
- Constant valuepublic LinePlot addSeries(String seriesName, double[] y)
seriesName
- Series namey
- Valuespublic LinePlot setValue(String seriesName, int x, double y)
seriesName
- Series namex
- x value. Must exists in xs.y
- y valuepublic LinePlot setValue(String seriesName, double x, double y)
seriesName
- Series namex
- x value. Must exists in xs.y
- y valueprotected String[] getDataHeaders()
Plot
getDataHeaders
in class Plot
protected String[][] getDataContent(String xAxisTicksFormat, String yAxisTicksFormat)
Plot
getDataContent
in class Plot
xAxisTicksFormat
- Number format for the values of the x axisyAxisTicksFormat
- Number format for the values of the x axisprotected de.erichseifert.gral.plots.AbstractPlot getGralPlot()
Plot
getGralPlot
in class Plot
Copyright © 2020. All rights reserved.