Documentation of 'org.statcato.graph.GraphFactory' Java class
GraphFactory
org.statcato.graph

Class GraphFactory



  • public class GraphFactory
    extends java.lang.Object
    Functions for generating graphs.
    Since:
    1.0
    See Also:
    org.jfree.chart
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.awt.Color[] COLORS 
      static int REG_CUBIC
      Cubic regression
      static int REG_EXP
      Exponential regression
      static int REG_FIXEDPOW
      Fixed power regression
      static int REG_LIN
      Linear regression
      static int REG_LOG
      Logarithmic regression
      static int REG_NONE
      No regression
      static int REG_POLY
      Polynomial regression
      static int REG_POW
      Power regression
      static int REG_QUAD
      Quadratic regression
    • Constructor Summary

      Constructors 
      Constructor and Description
      GraphFactory() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.util.Vector<java.lang.Double> computeRegressionCoeff(java.util.Vector<java.lang.Double> xVector, java.util.Vector<java.lang.Double> yVector, int regressionType, double regressionArg)
      Computes the regression coefficients for the given vectors and regression type.
      static JFreeChart createBarChart(java.lang.String title, java.lang.String xTitle, java.lang.String yTitle, DefaultCategoryDataset dataset, PlotOrientation orientation, boolean hasLegend)
      Creates a bar chart.
      static JFreeChart createBoxPlot(DefaultBoxAndWhiskerCategoryDataset dataset, java.lang.String title, java.lang.String xLabel, java.lang.String yLabel, boolean showLegend, boolean horizontal)
      Creates a box plot.
      static JFreeChart createHistogram(java.lang.String title, java.lang.String xTitle, java.lang.String yTitle, HistogramDataset dataset, boolean hasLegend, TickUnits units, double minBin, double minBinStart, boolean center, double yTicks)
      Creates a histogram.
      static JFreeChart createNormalQuantilePlot(java.util.ArrayList<java.lang.Double> YColumnArray, java.lang.String title, java.lang.String xLabel, java.lang.String yLabel, boolean isDataOnXAxis, boolean showRegressionLine)
      Creates a normal quantile plot.
      static 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 JFreeChart createPieChart(java.lang.String title, DefaultPieDataset data, boolean hasLegend, boolean hasLabel)
      Creates a pie chart.
      static JFreeChart createResidualPlot(XYSeriesCollection seriesCollection, java.lang.String title, java.lang.String xLabel, java.lang.String yLabel, boolean showLegend, boolean showZeroHorizon, double min, double max)
      Creates a residual plot.
      static JFreeChart createScatterplot(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.
      static JFreeChart createScatterplot(XYSeriesCollection seriesCollection, java.lang.String title, java.lang.String xLabel, java.lang.String yLabel, boolean showLegend, int regressionType, double regressionArg, double min, double max)
      Creates a scatterplot.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GraphFactory

        public GraphFactory()
    • Method Detail

      • createNormalQuantilePlot

        public static 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
      • createNormalQuantilePlot

        public static JFreeChart createNormalQuantilePlot(java.util.ArrayList<java.lang.Double> YColumnArray,
                                                          java.lang.String title,
                                                          java.lang.String xLabel,
                                                          java.lang.String yLabel,
                                                          boolean isDataOnXAxis,
                                                          boolean showRegressionLine)
        Creates a normal quantile plot.
        Parameters:
        YColumnArray - ArrayList 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 JFreeChart createBoxPlot(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 JFreeChart createScatterplot(XYSeriesCollection seriesCollection,
                                                   java.lang.String title,
                                                   java.lang.String xLabel,
                                                   java.lang.String yLabel,
                                                   boolean showLegend,
                                                   int regressionType,
                                                   double regressionArg,
                                                   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
        regressionType - type of regression
        regressionArg - regression argument
        min - minimum x value
        max - maximum x value
        Returns:
        JFreeChart object representing a scatterplot
      • computeRegressionCoeff

        public static java.util.Vector<java.lang.Double> computeRegressionCoeff(java.util.Vector<java.lang.Double> xVector,
                                                                                java.util.Vector<java.lang.Double> yVector,
                                                                                int regressionType,
                                                                                double regressionArg)
        Computes the regression coefficients for the given vectors and regression type.
        Parameters:
        xVector - vector of x (independent)values
        yVector - vector of y (dependent) values
        regressionType - type of regression
        regressionArg - arguments for specific types of regression
        Returns:
        vector of regression coefficients
      • createScatterplot

        public static JFreeChart createScatterplot(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:
      • createResidualPlot

        public static JFreeChart createResidualPlot(XYSeriesCollection seriesCollection,
                                                    java.lang.String title,
                                                    java.lang.String xLabel,
                                                    java.lang.String yLabel,
                                                    boolean showLegend,
                                                    boolean showZeroHorizon,
                                                    double min,
                                                    double max)
        Creates a residual plot.
        Parameters:
        seriesCollection - XYSeriesCollection containing the data series Y series contains residuals
        title - chart title
        xLabel - x-axis label
        yLabel - y-axis label
        showLegend - whether the legend should be shown
        showZeroHorizon - whether a horizontal line Y = 0 should be shown
        min - minimum x value
        max - maximum x value
        Returns:
        JFreeChart residual plot
      • createBarChart

        public static JFreeChart createBarChart(java.lang.String title,
                                                java.lang.String xTitle,
                                                java.lang.String yTitle,
                                                DefaultCategoryDataset dataset,
                                                PlotOrientation orientation,
                                                boolean hasLegend)
        Creates a bar chart.
        Parameters:
        title - chart title
        xTitle - x-axis title
        yTitle - y-axis title
        dataset - bar chart dataset
        orientation - chart orientation
        hasLegend - whether a legend is included
        Returns:
        JFreeChart object representing a bar chart
      • createPieChart

        public static JFreeChart createPieChart(java.lang.String title,
                                                DefaultPieDataset data,
                                                boolean hasLegend,
                                                boolean hasLabel)
        Creates a pie chart.
        Parameters:
        title - chart title
        data - pie chart dataset
        hasLegend - whether a legend is included
        hasLabel - whether labels for pie slices are included
        Returns:
        JFreeChart object representing a pie chart
      • createHistogram

        public static JFreeChart createHistogram(java.lang.String title,
                                                 java.lang.String xTitle,
                                                 java.lang.String yTitle,
                                                 HistogramDataset dataset,
                                                 boolean hasLegend,
                                                 TickUnits units,
                                                 double minBin,
                                                 double minBinStart,
                                                 boolean center,
                                                 double yTicks)
        Creates a histogram.
        Parameters:
        title - title of the histogram
        xTitle - x-axis label
        yTitle - y-axis label
        dataset - HistogramDataset object
        hasLegend - whether a legend should be displayed
        units - tick units object of the x-axis
        minBin - bin size
        minBinStart - the start of the first bin
        center - whether the tick marks should be displayed in the middle of bins
        yTicks - tick mark units of the y-axis
        Returns:
        JFreeChart object representing a histogram

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.