SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.charts.EmpiricalSeriesCollection Class Reference

Stores data used in a EmpiricalChart. More...

Inheritance diagram for umontreal.ssj.charts.EmpiricalSeriesCollection:
umontreal.ssj.charts.SSJXYSeriesCollection

Public Member Functions

 EmpiricalSeriesCollection ()
 Creates a new EmpiricalSeriesCollection instance with empty dataset.
 EmpiricalSeriesCollection (double[]... data)
 Creates a new EmpiricalSeriesCollection instance with default parameters and given data series.
 EmpiricalSeriesCollection (double[] data, int numPoints)
 Creates a new EmpiricalSeriesCollection instance with default parameters and a given series data.
 EmpiricalSeriesCollection (DoubleArrayList... data)
 Creates a new EmpiricalSeriesCollection instance with default parameters and given data.
 EmpiricalSeriesCollection (TallyStore... tallies)
 Creates a new EmpiricalSeriesCollection instance with default parameters and given data.
 EmpiricalSeriesCollection (XYSeriesCollection data)
 Creates a new EmpiricalSeriesCollection instance with default parameters and given data series.
Data control methods @{
int add (double[] observationSet)
 Adds a data series into the series collection.
int add (double[] observationSet, int numPoints)
 Adds a data series into the series collection.
int add (DoubleArrayList observationSet)
 Adds a data series into the series collection.
int add (TallyStore tally)
 Adds a data series into the series collection.
Rendering methods @{
String getMarksType (int series)
 Returns the mark type associated with the series-th data series.
void setMarksType (int series, String marksType)
 Adds marks on points to a data series.
String getDashPattern (int series)
 Returns the dash pattern associated with the series-th data series.
void setDashPattern (int series, String dashPattern)
 Selects dash pattern for a data series.
String toLatex (double XScale, double YScale, double XShift, double YShift, double xmin, double xmax, double ymin, double ymax)
 Formats and returns a string containing a LaTeX-compatible source code which represents this data series collection.
Public Member Functions inherited from umontreal.ssj.charts.SSJXYSeriesCollection
double getX (int series, int index)
 Returns the \(x\)-value at the specified index in the specified series.
double getY (int series, int index)
 Returns the \(y\)-value at the specified index in the specified series.
XYDataset getSeriesCollection ()
 Returns the XYDataset object associated with the current object.
double[] getDomainBounds ()
 Returns domain ( \(x\)-coordinates) min and max values.
double[] getRangeBounds ()
 Returns range ( \(y\)-coordinates) min and max values.
String toString ()
 Returns in a String all data contained in the current object.
XYItemRenderer getRenderer ()
 Returns the XYItemRenderer object associated with the current object.
void setRenderer (XYItemRenderer renderer)
 Sets the XYItemRenderer object associated with the current variable.
Color getColor (int series)
 Gets the current plotting color of the selected series.
void setColor (int series, Color color)
 Sets a new plotting color to the series \(series\).

Additional Inherited Members

static String detectXColorClassic (Color color)
 Converts a java Color object into a friendly and readable LaTeX/xcolor string.
static Color getDefaultColor (int index)
 Gives the default color associated with a series.

Detailed Description

Stores data used in a EmpiricalChart.

EmpiricalSeriesCollection provides complementary tools to draw empirical distribution charts, like add plots series. This class is linked with XYSeriesCollection class from JFreeChart to store data plots, and linked with JFreeChart EmpiricalRenderer to render the plot. EmpiricalRenderer has been developed at the Université de Montréal to extend the JFreeChart API, and is used to render charts with an empirical chart style in a JFreeChart chart.

Definition at line 48 of file EmpiricalSeriesCollection.java.

Constructor & Destructor Documentation

◆ EmpiricalSeriesCollection() [1/6]

umontreal.ssj.charts.EmpiricalSeriesCollection.EmpiricalSeriesCollection ( )

Creates a new EmpiricalSeriesCollection instance with empty dataset.

Definition at line 67 of file EmpiricalSeriesCollection.java.

◆ EmpiricalSeriesCollection() [2/6]

umontreal.ssj.charts.EmpiricalSeriesCollection.EmpiricalSeriesCollection ( double...[] data)

Creates a new EmpiricalSeriesCollection instance with default parameters and given data series.

Each input parameter represents an observation set. The values of this observation set must be sorted in increasing order.

Parameters
dataseries of point sets.

Definition at line 79 of file EmpiricalSeriesCollection.java.

◆ EmpiricalSeriesCollection() [3/6]

umontreal.ssj.charts.EmpiricalSeriesCollection.EmpiricalSeriesCollection ( double[] data,
int numPoints )

Creates a new EmpiricalSeriesCollection instance with default parameters and a given series data.

The values of data must be sorted in increasing order. However, only the first numPoints of data will be considered for the series.

Parameters
dataseries of point sets
numPointsnumber of points to plot

Definition at line 114 of file EmpiricalSeriesCollection.java.

◆ EmpiricalSeriesCollection() [4/6]

umontreal.ssj.charts.EmpiricalSeriesCollection.EmpiricalSeriesCollection ( DoubleArrayList... data)

Creates a new EmpiricalSeriesCollection instance with default parameters and given data.

The input parameter represents a collection of data observation sets. Each DoubleArrayList input parameter represents an observation set. The values of this observation set must be sorted in increasing order. Each DoubleArrayList variable corresponds to an observation set.

Parameters
dataseries of point sets.

Definition at line 144 of file EmpiricalSeriesCollection.java.

◆ EmpiricalSeriesCollection() [5/6]

umontreal.ssj.charts.EmpiricalSeriesCollection.EmpiricalSeriesCollection ( TallyStore... tallies)

Creates a new EmpiricalSeriesCollection instance with default parameters and given data.

The input parameter represents a collection of data observation sets. Each TallyStore input parameter represents an observation set.

Parameters
talliesseries of point sets.

Definition at line 179 of file EmpiricalSeriesCollection.java.

◆ EmpiricalSeriesCollection() [6/6]

umontreal.ssj.charts.EmpiricalSeriesCollection.EmpiricalSeriesCollection ( XYSeriesCollection data)

Creates a new EmpiricalSeriesCollection instance with default parameters and given data series.

The input parameter represents a set of plotting data. Each series of the given collection corresponds to a plot on the chart.

Parameters
dataseries of point sets.

Definition at line 216 of file EmpiricalSeriesCollection.java.

Member Function Documentation

◆ add() [1/4]

int umontreal.ssj.charts.EmpiricalSeriesCollection.add ( double[] observationSet)

Adds a data series into the series collection.

Parameters
observationSetnew series values.
Returns
Integer that represent the new point set’s position in the XYSeriesCollection object.

Definition at line 247 of file EmpiricalSeriesCollection.java.

◆ add() [2/4]

int umontreal.ssj.charts.EmpiricalSeriesCollection.add ( double[] observationSet,
int numPoints )

Adds a data series into the series collection.

Only the first numPoints of observationSet will be added to the new series.

Parameters
observationSetnew series values.
numPointsnumber of points to add.
Returns
Integer that represent the new point set’s position in the XYSeriesCollection object.

Definition at line 260 of file EmpiricalSeriesCollection.java.

◆ add() [3/4]

int umontreal.ssj.charts.EmpiricalSeriesCollection.add ( DoubleArrayList observationSet)

Adds a data series into the series collection.

Parameters
observationSetnew series values.
Returns
Integer that represent the new point set’s position in the XYSeriesCollection object.

Definition at line 295 of file EmpiricalSeriesCollection.java.

◆ add() [4/4]

int umontreal.ssj.charts.EmpiricalSeriesCollection.add ( TallyStore tally)

Adds a data series into the series collection.

Parameters
tallyumontreal.ssj.stat.TallyStore to add values.
Returns
Integer that represent the new point set’s position in the XYSeriesCollection object.

Definition at line 306 of file EmpiricalSeriesCollection.java.

◆ getDashPattern()

String umontreal.ssj.charts.EmpiricalSeriesCollection.getDashPattern ( int series)

Returns the dash pattern associated with the series-th data series.

Parameters
seriesseries index.
Returns
dash style.

Definition at line 348 of file EmpiricalSeriesCollection.java.

◆ getMarksType()

String umontreal.ssj.charts.EmpiricalSeriesCollection.getMarksType ( int series)

Returns the mark type associated with the series-th data series.

Parameters
seriesseries index.
Returns
mark type.

Definition at line 325 of file EmpiricalSeriesCollection.java.

◆ setDashPattern()

void umontreal.ssj.charts.EmpiricalSeriesCollection.setDashPattern ( int series,
String dashPattern )

Selects dash pattern for a data series.

It is possible to use all the dash options provided by the TikZ package: solid, dotted, densely dotted, loosely dotted, dashed, densely dashed and loosely dashed.

Parameters
seriesseries index.
dashPatterndash style.

Definition at line 360 of file EmpiricalSeriesCollection.java.

◆ setMarksType()

void umontreal.ssj.charts.EmpiricalSeriesCollection.setMarksType ( int series,
String marksType )

Adds marks on points to a data series.

It is possible to use all the marks provided by the TikZ package, some of which are *, + and x. A blank character, used by default, will disable marks. The PGF/TikZ documentation provides more information about placing marks on plots.

Parameters
seriesseries index.
marksTypemark type.

Definition at line 338 of file EmpiricalSeriesCollection.java.

◆ toLatex()

String umontreal.ssj.charts.EmpiricalSeriesCollection.toLatex ( double XScale,
double YScale,
double XShift,
double YShift,
double xmin,
double xmax,
double ymin,
double ymax )

Formats and returns a string containing a LaTeX-compatible source code which represents this data series collection.

The original datasets are shifted and scaled with the XShift, YShift, XScale and YScale parameters. xmin, xmax, ymin and ymax represent the chart bounds.

Parameters
XScaleDomain original data scale.
YScaleRange original data scale.
XShiftDomain original data shift value.
YShiftRange original data shift value.
xminDomain min bound.
xmaxDomain nax bound.
yminRange min bound.
ymaxRange nax bound.
Returns
TikZ code.

Reimplemented from umontreal.ssj.charts.SSJXYSeriesCollection.

Definition at line 364 of file EmpiricalSeriesCollection.java.


The documentation for this class was generated from the following file: