public abstract class Plot extends Object
Constructor and Description |
---|
Plot() |
Modifier and Type | Method and Description |
---|---|
void |
draw()
Draws the plot into a JFrame
|
void |
exportData(String filename)
Exports plot data into a CSV file
|
void |
exportData(String filename,
boolean includeHeader)
Exports plot data into a CSV file
|
void |
exportData(String filename,
String separator)
Exports plot data into a CSV file
|
void |
exportData(String filename,
String separator,
boolean includeHeader)
Exports plot data into a CSV file
|
void |
exportPlot(String filename)
Exports the plot to a PNG file
|
protected abstract String[][] |
getDataContent(String xAxisTicksFormat,
String yAxisTicksFormat)
Returns an String matrix with the content of the plot's data.
|
protected abstract String[] |
getDataHeaders()
Returns an String array with the headers of the plot's data
|
protected abstract de.erichseifert.gral.plots.AbstractPlot |
getGralPlot()
Gets an AbstractPlot using GRAL
|
void |
printData()
Prints the plot data into the standard output
|
void |
printData(String axisTicksFormat)
Prints the plot data into the standard output
|
void |
printData(String xAxisTicksFormat,
String yAxisTicksFormat)
Prints the plot data into the standard output
|
String |
toString() |
String |
toString(String axisTicksFormat)
Stringify the plot data
|
String |
toString(String xAxisTicksFormat,
String yAxisTicksFormat)
Stringify the plot data
|
public void exportData(String filename) throws IOException
filename
- File nameIOException
public void exportData(String filename, String separator) throws IOException
filename
- File nameseparator
- CSV separator field. By default: colon character (,)IOException
public void exportData(String filename, boolean includeHeader) throws IOException
filename
- File nameincludeHeader
- Include CSV header line. By default: trueIOException
public void exportData(String filename, String separator, boolean includeHeader) throws IOException
filename
- File nameseparator
- CSV separator field. By default: colon character (,)includeHeader
- Include CSV header line. By default: trueIOException
public void printData()
public void printData(String axisTicksFormat)
axisTicksFormat
- Number format of the axispublic void printData(String xAxisTicksFormat, String yAxisTicksFormat)
xAxisTicksFormat
- Number format of the x axisyAxisTicksFormat
- Number format of the y axispublic String toString(String axisTicksFormat)
axisTicksFormat
- Number format for the values of the axispublic String toString(String xAxisTicksFormat, String yAxisTicksFormat)
xAxisTicksFormat
- Number format for the values of the x axisyAxisTicksFormat
- Number format for the values of the x axisprotected abstract String[] getDataHeaders()
protected abstract String[][] getDataContent(String xAxisTicksFormat, String yAxisTicksFormat)
xAxisTicksFormat
- Number format for the values of the x axisyAxisTicksFormat
- Number format for the values of the x axispublic void draw()
public void exportPlot(String filename) throws IOException
filename
- PNG file nameIOException
protected abstract de.erichseifert.gral.plots.AbstractPlot getGralPlot()
Copyright © 2020. All rights reserved.