org.statcato.graph
Class GraphFactory

java.lang.Object
  extended by org.statcato.graph.GraphFactory

public class GraphFactory
extends java.lang.Object

Fumnctions for generating graphs.

Since:
1.0
Version:
%I%, %G%
Author:
Margaret Yau
See Also:
org.jfree.chart

Constructor Summary
GraphFactory()
           
 
Method Summary
static org.jfree.chart.JFreeChart createBoxPlot(org.jfree.data.statistics.DefaultBoxAndWhiskerCategoryDataset dataset, java.lang.String title, java.lang.String xLabel, java.lang.String yLabel, boolean showLegend, boolean horizontal)
          Creates a box plot.
static org.jfree.chart.JFreeChart createNormalQuantilePlot(java.util.Vector<java.lang.Double> YColumnVector, java.lang.String title, java.lang.String xLabel, java.lang.String yLabel, boolean isDataOnXAxis, boolean showRegressionLine)
          Creates a normal quantile plot.
static org.jfree.chart.JFreeChart createScatterplot(org.jfree.data.xy.XYSeriesCollection seriesCollection, java.lang.String title, java.lang.String xLabel, java.lang.String yLabel, boolean showLegend, boolean showRegression, double min, double max)
          Creates a scatterplot.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphFactory

public GraphFactory()
Method Detail

createNormalQuantilePlot

public static org.jfree.chart.JFreeChart createNormalQuantilePlot(java.util.Vector<java.lang.Double> YColumnVector,
                                                                  java.lang.String title,
                                                                  java.lang.String xLabel,
                                                                  java.lang.String yLabel,
                                                                  boolean isDataOnXAxis,
                                                                  boolean showRegressionLine)
Creates a normal quantile plot.

Parameters:
YColumnVector - vector of data values
title - chart title
xLabel - x axis label
yLabel - y axis label
isDataOnXAxis - whether the data is on the x axis
showRegressionLine - whether the regression line should be shown
Returns:
JFreeChart plot object

createBoxPlot

public static org.jfree.chart.JFreeChart createBoxPlot(org.jfree.data.statistics.DefaultBoxAndWhiskerCategoryDataset dataset,
                                                       java.lang.String title,
                                                       java.lang.String xLabel,
                                                       java.lang.String yLabel,
                                                       boolean showLegend,
                                                       boolean horizontal)
Creates a box plot.

Parameters:
dataset - DefaultBoxAndWhisterCategoryDataset object
title - plot title
xLabel - x-axis label
yLabel - y-axis label
showLegend - whether the legend should be shown
horizontal - whether the plot is horizontal
Returns:
JFreeChart plot object

createScatterplot

public static org.jfree.chart.JFreeChart createScatterplot(org.jfree.data.xy.XYSeriesCollection seriesCollection,
                                                           java.lang.String title,
                                                           java.lang.String xLabel,
                                                           java.lang.String yLabel,
                                                           boolean showLegend,
                                                           boolean showRegression,
                                                           double min,
                                                           double max)
Creates a scatterplot.

Parameters:
seriesCollection - XYSeriesCollection containing the data series
title - chart title
xLabel - x-axis label
yLabel - y-axis label
showLegend - whether the legend should be shown
showRegression - whether a regression line should be shown
min - minimum x value
max - maximum x value
Returns: