Package es.upm.etsisi.cf4j.util.plot
Class ScatterPlot
- java.lang.Object
-
- es.upm.etsisi.cf4j.util.plot.Plot
-
- es.upm.etsisi.cf4j.util.plot.ScatterPlot
-
public class ScatterPlot extends Plot
Implements an ScatterPlot.
-
-
Constructor Summary
Constructors Constructor Description ScatterPlot(String xLabel, String yLabel)
Creates new ScatterPlot
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScatterPlot
addPoint(double x, double y)
Adds new point to the scatter plotprotected 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 dataprotected de.erichseifert.gral.plots.AbstractPlot
getGralPlot()
Gets an AbstractPlot using GRAL-
Methods inherited from class es.upm.etsisi.cf4j.util.plot.Plot
draw, exportData, exportData, exportData, exportData, exportPlot, printData, printData, printData, toString, toString, toString
-
-
-
-
Method Detail
-
addPoint
public ScatterPlot addPoint(double x, double y)
Adds new point to the scatter plot- Parameters:
x
- x valuey
- y value- Returns:
- Self ScatterPlot instance
-
getDataHeaders
protected String[] getDataHeaders()
Description copied from class:Plot
Returns an String array with the headers of the plot's data- Specified by:
getDataHeaders
in classPlot
- Returns:
- Headers of the plot's data
-
getDataContent
protected String[][] getDataContent(String xAxisTicksFormat, String yAxisTicksFormat)
Description copied from class:Plot
Returns an String matrix with the content of the plot's data. First dimension denotes the row and second dimension denotes the column that must be correlated with the header returned by getDataHeaders().- Specified by:
getDataContent
in classPlot
- Parameters:
xAxisTicksFormat
- Number format for the values of the x axisyAxisTicksFormat
- Number format for the values of the x axis- Returns:
- String matrix with the content of the plot's data
-
getGralPlot
protected de.erichseifert.gral.plots.AbstractPlot getGralPlot()
Description copied from class:Plot
Gets an AbstractPlot using GRAL- Specified by:
getGralPlot
in classPlot
- Returns:
- GRAL's AbstractPlot
-
-