Documentation of 'umontreal.iro.lecuyer.charts.BoxChart' Java class
BoxChart
umontreal.iro.lecuyer.charts

Class BoxChart



  • public class BoxChart
    extends CategoryChart
    This class provides tools to create and manage box-and-whisker plots. Each BoxChart object is linked with a BoxSeriesCollection data set.

    A boxplot is a convenient way of viewing sets of numerical data through their summaries: the smallest observation, first quartile ( Q1 = x.25), median ( Q2 = x.5), third quartile ( Q3 = x.75), and largest observation. Sometimes, the mean and the outliers are also plotted.

    In the charts created by this class, the box has its lower limit at Q1 and its upper limit at Q3. The median is indicated by the line inside the box, while the mean is at the center of the filled circle inside the box. Define the interquartile range as (Q3 - Q1). Any data observation which is more than 1.5(Q3 - Q1) lower than the first quartile or 1.5(Q3 - Q1) higher than the third quartile is considered an outlier. The smallest and the largest values that are not outliers are connected to the box with a vertical line or "whisker" which is ended by a horizontal line. Outliers are indicated by hollow circles outside the whiskers. Triangles indicate the existence of very far outliers.

    • Constructor Summary

      Constructors 
      Constructor and Description
      BoxChart()
      Initializes a new BoxChart instance with an empty data set.
      BoxChart(java.lang.String title, java.lang.String XLabel, java.lang.String YLabel, double[]... data)
      Initializes a new BoxChart instance with data data.
      BoxChart(java.lang.String title, java.lang.String XLabel, java.lang.String YLabel, double[] data, int numPoints)
      Initializes a new BoxChart instance with data data.
    • Constructor Detail

      • BoxChart

        public BoxChart()
        Initializes a new BoxChart instance with an empty data set.
      • BoxChart

        public BoxChart(java.lang.String title,
                        java.lang.String XLabel,
                        java.lang.String YLabel,
                        double[] data,
                        int numPoints)
        Initializes a new BoxChart instance with data data. title is a title, XLabel is a short description of the x-axis, and YLabel a short description of the y-axis. The input parameter data represents a set of plotting data. Only the first numPoints of data will be considered for the plot.
        Parameters:
        title - chart title.
        XLabel - Label on x-axis.
        YLabel - Label on y-axis.
        data - point sets.
        numPoints - Number of points to plot
      • BoxChart

        public BoxChart(java.lang.String title,
                        java.lang.String XLabel,
                        java.lang.String YLabel,
                        double[]... data)
        Initializes a new BoxChart instance with data data. title sets a title, XLabel is a short description of the x-axis, and YLabel is a short description of the y-axis. The input parameter data represents a set of plotting data.
        Parameters:
        title - chart title.
        XLabel - Label on x-axis.
        YLabel - Label on y-axis.
        data - series of point sets.
    • Method Detail

      • add

        public int add(double[] data)
        Adds a data series into the series collection. Vector data represents a set of plotting data.
        Parameters:
        data - point sets.
        Returns:
        Integer that represent the new point set's position in the JFreeChart BoxSeriesCollection object.
      • add

        public int add(double[] data,
                       int numPoints)
        Adds a data series into the series collection. Vector data represents a set of plotting data. Only the first numPoints of data will be taken into account for the new series.
        Parameters:
        data - point set.
        numPoints - number of points to add.
        Returns:
        Integer that represent the new point set's position in the JFreeChart BoxSeriesCollection object.
      • getSeriesCollection

        public BoxSeriesCollection getSeriesCollection()
        Returns the chart's dataset.
        Returns:
        the chart's dataset.
      • setSeriesCollection

        public void setSeriesCollection(BoxSeriesCollection dataset)
        Links a new dataset to the current chart.
        Parameters:
        dataset - new dataset.
      • setFillBox

        public void setFillBox(boolean fill)
        Sets fill to true, if the boxes are to be filled.
        Parameters:
        fill - true if the boxes are filled
      • view

        public javax.swing.JFrame view(int width,
                                       int height)
        Displays chart on the screen using Swing. This method creates an application containing a chart panel displaying the chart. The created frame is positioned on-screen, and displayed before it is returned. The circle represents the mean, the dark line inside the box is the median, the box limits are the first and third quartiles, the lower whisker (the lower line outside the box) is the first decile, and the upper whisker is the ninth decile. The outliers, if any, are represented by empty circles, or arrows if outside the range bounds.
        Specified by:
        view in class CategoryChart
        Parameters:
        width - frame width.
        height - frame height.
        Returns:
        frame containing the chart.;
      • toLatex

        public java.lang.String toLatex(double width,
                                        double height)
        NOT IMPLEMENTED.
        Specified by:
        toLatex in class CategoryChart
        Parameters:
        width - Chart's width in centimeters.
        height - Chart's height in centimeters.
        Returns:
        LaTeX source code.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.