|
SSJ V. 2.6.2. |
||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Class Summary | |
---|---|
Axis | Represents an axis of a chart encapsulated by an instance of XYChart. |
BoxChart | This class provides tools to create and manage box-and-whisker plots. |
BoxSeriesCollection | This class stores data used in a
CategoryChart . |
CategoryChart | This class provides tools to create charts from data in a simple way. |
ContinuousDistChart | This class provides tools to plot the density and the cumulative probability of a continuous probability distribution. |
CustomHistogramDataset | A dataset that can be used for creating histograms. |
DiscreteDistIntChart | This class provides tools to plot the mass function and the cumulative probability of a discrete probability distribution over the integers. |
EmpiricalChart | This class provides additional tools to create and manage empirical plots. |
EmpiricalRenderer | A renderer that draws horizontal lines between points and/or draws shapes at each data point to provide an empirical style chart. |
EmpiricalSeriesCollection | Stores data used in a EmpiricalChart. |
HistogramChart | This class provides tools to create and manage histograms. |
HistogramSeriesCollection | Stores data used in a HistogramChart. |
MultipleDatasetChart | Provides tools to plot many datasets on the same chart. |
PlotFormat | Provide tools to import and export data set tables to and from Gnuplot, MATLAB and Mathematica compatible formats, or customized format. |
PPPlot | This class implements PP-plot (or probability-probability plot) objects that compare two probability distributions. |
QQPlot | This class implements QQ-plot (or quantile-quantile plot) objects that compare two probability distributions. |
ScatterChart | This class provides tools to create and manage scatter plots. |
SSJCategorySeriesCollection | Stores data used in a CategoryChart. |
SSJXYSeriesCollection | Stores data used in a XYChart. |
XYChart | This class provides tools to create charts from data in a simple way. |
XYLineChart | This class provides tools to create and manage curve plots. |
XYListSeriesCollection | This class extends
SSJXYSeriesCollection . |
YListChart | This class extends the class
XYLineChart . |
YListSeriesCollection | This class extends
XYListSeriesCollection . |
This package contains classes to produce charts used in the Java software developed in the simulation laboratory of the DIRO, at the Universite de Montreal. This package provides tools for easy construction, visualization, and customization of XY plots, histograms, and empirical styled charts from a Java program. It uses and extends the free and ``open source'' JFreeChart tool to manage the charts. JFreeChart is distributed under the terms of the GNU Lesser General Public License (LGPL), and can be found at http://www.jfree.org/jfreechart/.
This package also provides facilities to export charts to PGF/TikZ source code, which can be included into LATEX documents. TikZ is a free LATEX package to produce pictures such as plots, and can be downloaded from http://sourceforge.net/projects/pgf.
The user does not need to be familiar with the JFreeChart package or the TikZ syntax to use these tools, except if customization is required. For this, one may see the API specification of JFreeChart, and the reference manual of TikZ.
The two basic abstract classes of package charts are umontreal.iro.lecuyer.chartsXYChart and umontreal.iro.lecuyer.chartsCategoryChart. All other charts inherit from one of these two. Charts are managed by the mother class which contains the data tables in a *SeriesCollection object, and the information about x-axis and y-axis in umontreal.iro.lecuyer.chartsAxis instances. All these objects encapsulate JFreeChart instances along with some additional TikZ-specific attributes. The method umontreal.iro.lecuyer.chartsXYChartview displays charts on screen while the method toLatex formats and returns a java.langString which contains the TikZ source code that can be written to a LATEX file.
Several chart styles are available and each one is represented by a subclass of umontreal.iro.lecuyer.chartsXYChart or of umontreal.iro.lecuyer.chartsCategoryChart. The umontreal.iro.lecuyer.chartsXYLineChart uses umontreal.iro.lecuyer.chartsXYListSeriesCollection to plot curves and lines, the umontreal.iro.lecuyer.chartsHistogramSeriesCollection class is used by umontreal.iro.lecuyer.chartsHistogramChart to plot histograms, and the umontreal.iro.lecuyer.chartsEmpiricalSeriesCollection is used by umontreal.iro.lecuyer.chartsEmpiricalChart to plot empirical style charts. It is possible to draw a scatter plot or a box plot using umontreal.iro.lecuyer.chartsScatterChart or umontreal.iro.lecuyer.chartsBoxChart respectively. These concrete subclasses have similar APIs, but they are specialized for different kinds of charts.
These charts can be customized using *SeriesCollection subclasses and umontreal.iro.lecuyer.chartsAxis. First, one can use methods in the umontreal.iro.lecuyer.chartsXYChart class for setting the range values and a background grid. One can also use the method getSeriesCollection() for subclasses of charts to obtain the dataset of the chart, which is represented by a *SeriesCollection object. This dataset can be customized in the following ways by calling methods on the series collection: selecting color, changing plot style (straight lines, curves, marks only, ...), putting marks on points, setting a label and selecting the dash pattern (solid, dotted, dashed, ...). The available properties depend on the type of chart. Moreover, objects representing the axes can be retrieved with umontreal.iro.lecuyer.chartsXYChartgetXAxis for the x-axis, and umontreal.iro.lecuyer.chartsXYChartgetYAxis for the y-axis. By using methods in umontreal.iro.lecuyer.chartsAxis, many customizations are possible: setting a label to the axis, setting ticks labels and values (auto ticks, periodical ticks or manually defined ticks) and changing the twin axis position on the current axis to select where axes must appear. These settings are independent for each axis.
Each chart object from SSJ encapsulates a JFreeChart object: a umontreal.iro.lecuyer.chartsXYChart instance contains a JFreeChart instance from JFreeChart API, a *SeriesCollection contains a XYDataset and a XYItemRenderer, and finally an umontreal.iro.lecuyer.chartsAxis contains a NumberAxis. So any parameter proposed by JFreeChart is reachable through getter methods. However, changing the JFreeChart parameters directly may have no impact on the produced TikZ source code.
The two special classes umontreal.iro.lecuyer.chartsContinuousDistChart and umontreal.iro.lecuyer.chartsDiscreteDistIntChart can be used to plot probability densities, mass functions, and cumulative probabilities for continuous or discrete distributions, which are implemented in package umontreal.iro.lecuyerprobdist of SSJ.
The package charts provides additional tools for formatting data plot, and creating charts with multiple datasets. The umontreal.iro.lecuyer.chartsPlotFormat class offers basic tools to import and export data from files. Supported file formats are GNUPlot and standard CSV, which is widely used and accepted by most mathematical softwares such as MATLAB and Mathematica. Customizing file input and output format is also possible. Finally umontreal.iro.lecuyer.chartsMultipleDatasetChart provides tools to plot with different styles on the same chart.
For a series of examples, see the pdf documentation.
|
SSJ V. 2.6.2. |
||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |