public class XYPlot extends Plot
Constructor and Description |
---|
XYPlot(String[] values,
String xLabel,
String yLabel)
Creates a new XYPlot
|
XYPlot(String[] values,
String xLabel,
String yLabel,
boolean hideLegend)
Creates a new XYPlot
|
Modifier and Type | Method and Description |
---|---|
XYPlot |
addSeries(String seriesName)
Adds a new empty series to the plot.
|
XYPlot |
addSeries(String seriesName,
double[] xs,
double[] ys)
Adds a new series to the plot. xs and ys positions must be correlated with point labels.
|
XYPlot |
addSeries(String seriesName,
double x,
double y)
Adds a new series to the plot initializing x and y to a constant one for all point labels.
|
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
|
XYPlot |
setLabelsNotVisible(String seriesName)
Set the labels not visible for a series
|
XYPlot |
setLabelsVisible(String seriesName)
Set the labels visible for a series
|
XYPlot |
setXY(String seriesName,
String label,
double x,
double y)
Sets a single point of a series
|
draw, exportData, exportData, exportData, exportData, exportPlot, printData, printData, printData, toString, toString, toString
public XYPlot(String[] values, String xLabel, String yLabel)
xLabel
- Label of the x axisyLabel
- Label of the y axispublic XYPlot addSeries(String seriesName)
seriesName
- Series namepublic XYPlot addSeries(String seriesName, double x, double y)
seriesName
- Series namex
- x initializationy
- y initializationpublic XYPlot addSeries(String seriesName, double[] xs, double[] ys)
seriesName
- Series namexs
- x valuesys
- y valuespublic XYPlot setXY(String seriesName, String label, double x, double y)
seriesName
- Series namelabel
- Label value of the point. Must existsx
- x valuey
- y valuepublic XYPlot setLabelsVisible(String seriesName)
seriesName
- Series namepublic XYPlot setLabelsNotVisible(String seriesName)
seriesName
- Series nameprotected 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.