procope.tools
Class ChartTools
java.lang.Object
procope.tools.ChartTools
public class ChartTools
- extends Object
Contains static methods to handle JFreeChart chart objects.
- Author:
- Jan Krumsiek
Method Summary |
static org.jfree.chart.JFreeChart |
generateHistogram(String title,
double[] data,
boolean relative,
int bins)
Generates a histogram chart from a given dataset. |
static void |
writeChartToPNG(org.jfree.chart.JFreeChart chart,
File output,
int width,
int height)
Writes a given JFreeChart to a PNG file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChartTools
public ChartTools()
writeChartToPNG
public static void writeChartToPNG(org.jfree.chart.JFreeChart chart,
File output,
int width,
int height)
throws IOException
- Writes a given JFreeChart to a PNG file.
- Parameters:
chart
- the chart to be plotteoutput
- output filewidth
- width of the imageheight
- height of the image
- Throws:
IOException
- if the file could not be written- See Also:
generateHistogram(String, double[], boolean, int)
,
ROCCurveHandler.generateChart(java.util.List, java.util.List)
generateHistogram
public static org.jfree.chart.JFreeChart generateHistogram(String title,
double[] data,
boolean relative,
int bins)
- Generates a histogram chart from a given dataset.
- Parameters:
data
- dataset from which the histogram will be calculatedrelative
- show relative frequencies?bins
- number of bins
- Returns:
- the histogram chart