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

Class EmpiricalChart



  • public class EmpiricalChart
    extends XYChart
    This class provides additional tools to create and manage empirical plots. Empirical plots are used to plot empirical distributions. The EmpiricalChart class is the simplest way to produce empirical plots only. Each EmpiricalChart object is linked with an EmpiricalSeriesCollection data set.
    • Constructor Detail

      • EmpiricalChart

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

        public EmpiricalChart(java.lang.String title,
                              java.lang.String XLabel,
                              java.lang.String YLabel,
                              double[]... data)
        Initializes a new EmpiricalChart 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 vectors data represents a collection of observation sets. Each vector of data represents a x-coordinates set. Therefore data [i], i = 0,…, n - 1, is used to draw the i-th plot. The values of each observation set data[i] must be sorted in increasing order.
        Parameters:
        title - chart title.
        XLabel - Label on x-axis.
        YLabel - Label on y-axis.
        data - series of point sets.
      • EmpiricalChart

        public EmpiricalChart(java.lang.String title,
                              java.lang.String XLabel,
                              java.lang.String YLabel,
                              double[] data,
                              int numPoints)
        Initializes a new EmpiricalChart instance with a set of points data. title is a title, XLabel is a short description of the x-axis and YLabel a short description of the y-axis. Vector data represents a x-coordinates set. The values of this observation set must be sorted in increasing order. Only the first numPoints of data will be considered to plot.
        Parameters:
        title - chart title.
        XLabel - Label on x-axis.
        YLabel - Label on y-axis.
        data - series of point sets.
        numPoints - number of points to plot
      • EmpiricalChart

        public EmpiricalChart(java.lang.String title,
                              java.lang.String XLabel,
                              java.lang.String YLabel,
                              DoubleArrayList... data)
        Similar to the above constructor, but with DoubleArrayList. A DoubleArrayList from the Colt library is used to store data. The values of each observation set data[i] must be sorted in increasing order.
        Parameters:
        title - chart title.
        XLabel - Label on x-axis.
        YLabel - Label on y-axis.
        data - series of point sets.
      • EmpiricalChart

        public EmpiricalChart(java.lang.String title,
                              java.lang.String XLabel,
                              java.lang.String YLabel,
                              TallyStore... tallies)
        Initializes a new EmpiricalChart instance with data arrays contained in each TallyStore object. The input parameter tallies represents a collection of observation sets. Therefore, the i-th tallies is used to draw the i-th plot.
        Parameters:
        title - chart title.
        XLabel - Label on x-axis.
        YLabel - Label on y-axis.
        tallies - series of observation sets.
      • EmpiricalChart

        public EmpiricalChart(java.lang.String title,
                              java.lang.String XLabel,
                              java.lang.String YLabel,
                              XYSeriesCollection data)
        Initializes a new EmpiricalChart instance with data data. The input parameter data represents a set of plotting data. XYSeriesCollection is a JFreeChart-like container class used to store and manage observation sets.
        Parameters:
        title - chart title.
        XLabel - Label on x-axis.
        YLabel - Label on y-axis.
        data - series collection.
    • Method Detail

      • getSeriesCollection

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

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

        public void setTicksSynchro(int s)
        Synchronizes x-axis ticks to the s-th series x-values.
        Specified by:
        setTicksSynchro in class XYChart
        Parameters:
        s - series used to define ticks.
      • 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 width and the height of the chart are measured in pixels.
        Specified by:
        view in class XYChart
        Parameters:
        width - frame width in pixels.
        height - frame height in pixels.
        Returns:
        frame containing the chart.
      • toLatex

        public java.lang.String toLatex(double width,
                                        double height)
        Description copied from class: XYChart
        Exports the chart to a LATEX source code using PGF/TikZ. This method constructs and returns a string that can be written to a LATEX document to render the plot. width and height represents the width and the height of the produced chart. These dimensions do not take into account the axes and labels extra space. The width and the height of the chart are measured in centimeters.
        Specified by:
        toLatex in class XYChart
        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.