SSJ
V. labo.

umontreal.iro.lecuyer.charts
Class EmpiricalChart

java.lang.Object
  extended by umontreal.iro.lecuyer.charts.XYChart
      extended by umontreal.iro.lecuyer.charts.EmpiricalChart

public class EmpiricalChart
extends XYChart

EmpiricalChart

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 umontreal.iro.lecuyer.chartsEmpiricalSeriesCollection data set.


Constructor Summary
EmpiricalChart()
          .
EmpiricalChart(String title, String XLabel, String YLabel, double[]... data)
          .
EmpiricalChart(String title, String XLabel, String YLabel, double[] data, int numPoints)
          .
EmpiricalChart(String title, String XLabel, String YLabel, DoubleArrayList... data)
          .
EmpiricalChart(String title, String XLabel, String YLabel, TallyStore... tallies)
          .
EmpiricalChart(String title, String XLabel, String YLabel, XYSeriesCollection data)
          .
 
Method Summary
 EmpiricalSeriesCollection getSeriesCollection()
          .
 void setSeriesCollection(EmpiricalSeriesCollection dataset)
          .
 void setTicksSynchro(int s)
          .
 String toLatex(double width, double height)
          Exports the chart to a LATEX source code using PGF/TikZ.
 JFrame view(int width, int height)
          .
 
Methods inherited from class umontreal.iro.lecuyer.charts.XYChart
disableGrid, drawVerticalLine, enableGrid, getChartMargin, getJFreeChart, getTitle, getXAxis, getYAxis, setAutoRange, setAutoRange, setAutoRange00, setChartMargin, setLatexDocFlag, setManualRange, setManualRange, setManualRange00, setprobFlag, setTitle, toLatexFile
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmpiricalChart

public EmpiricalChart()
. \begin{tabb}
 Initializes a new \texttt{EmpiricalChart} instance with an empty data set.
 \end{tabb}


EmpiricalChart

public EmpiricalChart(String title,
                      String XLabel,
                      String YLabel,
                      double[]... data)
. \begin{tabb}
 Initializes a new \texttt{EmpiricalChart} instance with data \text...
 ...n set \texttt{data}$[i]$\ \emph{must be sorted}
 in increasing order.
 \end{tabb}
titlechart title. XLabelLabel on x-axis. YLabelLabel on y-axis. dataseries of point sets.


EmpiricalChart

public EmpiricalChart(String title,
                      String XLabel,
                      String YLabel,
                      double[] data,
                      int numPoints)
. \begin{tabb}
 Initializes a new \texttt{EmpiricalChart} instance with a set of p...
 ...rst} \texttt{numPoints} of \texttt{data} will
 be considered to plot.
 \end{tabb}
titlechart title. XLabelLabel on x-axis. YLabelLabel on y-axis. dataseries of point sets. numPointsnumber of points to plot


EmpiricalChart

public EmpiricalChart(String title,
                      String XLabel,
                      String YLabel,
                      DoubleArrayList... data)
. \begin{tabb}
 Similar to the above constructor, but with \texttt{DoubleArrayList...
 ...on set \texttt{data}$[i]$
 \emph{must be sorted} in increasing order.
 \end{tabb}
titlechart title. XLabelLabel on x-axis. YLabelLabel on y-axis. dataseries of point sets.


EmpiricalChart

public EmpiricalChart(String title,
                      String XLabel,
                      String YLabel,
                      TallyStore... tallies)
. \begin{tabb}
 Initializes a new \texttt{EmpiricalChart} instance with data array...
 ...refore, the $i$-th \texttt{tallies} is used to draw
 the $i$-th plot.
 \end{tabb}
titlechart title. XLabelLabel on x-axis. YLabelLabel on y-axis. talliesseries of observation sets.


EmpiricalChart

public EmpiricalChart(String title,
                      String XLabel,
                      String YLabel,
                      XYSeriesCollection data)
. \begin{tabb}
 Initializes a new \texttt{EmpiricalChart} instance with data \text...
 ...art}-like container class
 used to store and manage observation sets.
 \end{tabb}
titlechart title. XLabelLabel on x-axis. YLabelLabel on y-axis. dataseries collection.

Method Detail

getSeriesCollection

public EmpiricalSeriesCollection getSeriesCollection()
. \begin{tabb}
 Returns the chart's dataset.
 \end{tabb}
the chart's dataset.


setSeriesCollection

public void setSeriesCollection(EmpiricalSeriesCollection dataset)
. \begin{tabb}
 Links a new dataset to the current chart.
 \end{tabb}
datasetnew dataset.


setTicksSynchro

public void setTicksSynchro(int s)
. \begin{tabb}
 Synchronizes $x$-axis ticks to the $s$-th series $x$-values.
 \end{tabb}
sseries used to define ticks.

Specified by:
setTicksSynchro in class XYChart
Parameters:
s - series.

view

public JFrame view(int width,
                   int height)
. \begin{tabb}
 Displays chart on the screen using Swing.
 This method creates an ...
 ...{width} and the \texttt{height}
 of the chart are measured in pixels.
 \end{tabb}
widthframe width in pixels. heightframe height in pixels. frame containing the chart.

Specified by:
view in class XYChart

toLatex

public 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.

SSJ
V. labo.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.