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

Represents a data table which has a name, a number of observations (rows), a number of fields (columns), an array that contains the names (identifiers) of the fields, and a two-dimensional array that contains the data. More...

Public Member Functions

 PgfDataTable (String tableName, String tableLabel, String[] fields, double[][] data)
 Constructs a table with the given table name, array of field names, and data observations.
String formatTable ()
 Formats the full table as a String, with the field names in the first row, and the data points (observations) in the following rows.
String formatTableTwoFields (int j1, int j2)
 Similar to formatTable, but retains only two selected columns of the table (i.e., two selected fields), specified by j1 and j2.
String formatPgfCurveAddPlot (int j1, int j2, String plotoptions)
 Similar to formatTableTwoFields, but outputs complete LaTeX code in an appropriate format that adds a curve of the field j2 against field j1 with the pgfplot package.
String formatPgfCurveAddPlot (String xaxis, String yaxis, String plotoptions)
 In this version, the two fields are specified by their names in the table.
String drawPgfPlotSingleCurve (String title, String axistype, String xaxis, String yaxis, int logbasis, String axisoptions, String plotoptions)
 Returns a String that contains a complete tikzpicture for the pgfplot package, showing the field j2 against field j1.
String drawPgfPlotSingleCurve (String title, String axistype, int j1, int j2, int logbasis, String axisoptions, String plotoptions)
 Similar to the previous one.
String formatTableThreeFields (int j1, int j2, int j3)
 Similar to formatTableTwoFields(int, int), but for three fields.
String formatPgfCurveAddPlot (int j1, int j2, int j3, String plotoptions)
 Similar to formatPgf, but outputs complete LaTeX code in an appropriate format that adds a curve of the three fields j3, j2, and j1 with the pgfplot package.
String drawPgfPlotSingleCurve (String title, String axistype, int j1, int j2, int j3, int logbasis, String axisoptions, String plotoptions)
 Same as drawPgfPlotSingleCurve(String, String, int, int, int, String, String) but for three-dimensional plots.

Static Public Member Functions

static String drawPgfPlotManyCurves (String title, String axistype, int j1, int j2, ArrayList< PgfDataTable > listCurves, int logbasis, String axisoptions, String plotoptions)
 Returns a string that contains a complete tikzpicture for the pgfplot package, showing the field j2 against field j1, for all the curves that belong to listCurves.

Detailed Description

Represents a data table which has a name, a number of observations (rows), a number of fields (columns), an array that contains the names (identifiers) of the fields, and a two-dimensional array that contains the data.

Methods are available to format the table, or selected columns of the table, or to produce LaTeX code to draw a plot of one field against another field using the pgfplot LaTeX package. These types of tables can also be passed to other software to perform further operations.

Definition at line 16 of file PgfDataTable.java.

Constructor & Destructor Documentation

◆ PgfDataTable()

umontreal.ssj.stat.PgfDataTable.PgfDataTable ( String tableName,
String tableLabel,
String[] fields,
double data[][] )

Constructs a table with the given table name, array of field names, and data observations.

Parameters
tableNameName (descriptor) of the table.
tableLabelA label (very short name) for the table, to be used in plots to identify curves.
fieldsThe names of the fields (the variables).
dataThe data points; the entry data[s] contains observation s.

Definition at line 36 of file PgfDataTable.java.

Member Function Documentation

◆ drawPgfPlotManyCurves()

String umontreal.ssj.stat.PgfDataTable.drawPgfPlotManyCurves ( String title,
String axistype,
int j1,
int j2,
ArrayList< PgfDataTable > listCurves,
int logbasis,
String axisoptions,
String plotoptions )
static

Returns a string that contains a complete tikzpicture for the pgfplot package, showing the field j2 against field j1, for all the curves that belong to listCurves.

Parameters
titleis the title of the plot.
j1first selected field.
j2second selected field.
listCurvesthere will be one curve for each table in this list.
loglogsays if we want a log-log plot (true) or not (false).
plotoptionsis used to specify the options of addplot: addplot[plotoptions]
Returns
LaTeX code as a string.

Definition at line 179 of file PgfDataTable.java.

◆ drawPgfPlotSingleCurve() [1/3]

String umontreal.ssj.stat.PgfDataTable.drawPgfPlotSingleCurve ( String title,
String axistype,
int j1,
int j2,
int j3,
int logbasis,
String axisoptions,
String plotoptions )

Same as drawPgfPlotSingleCurve(String, String, int, int, int, String, String) but for three-dimensional plots.

Parameters
titleisthe title of the plot.
j1first selected field.
j2second selected field.
j3third selected field.
loglogsays if we want a log-log plot (true) or not (false).
plotoptionsis used to specify the options of addplot: addplot[plotoptions]
Returns
LaTeX code as a string.

Definition at line 256 of file PgfDataTable.java.

◆ drawPgfPlotSingleCurve() [2/3]

String umontreal.ssj.stat.PgfDataTable.drawPgfPlotSingleCurve ( String title,
String axistype,
int j1,
int j2,
int logbasis,
String axisoptions,
String plotoptions )

Similar to the previous one.

Definition at line 144 of file PgfDataTable.java.

◆ drawPgfPlotSingleCurve() [3/3]

String umontreal.ssj.stat.PgfDataTable.drawPgfPlotSingleCurve ( String title,
String axistype,
String xaxis,
String yaxis,
int logbasis,
String axisoptions,
String plotoptions )

Returns a String that contains a complete tikzpicture for the pgfplot package, showing the field j2 against field j1.

Parameters
titleis the title of the plot.
j1first selected field.
j2second selected field.
loglogsays if we want a log-log plot (true) or not (false).
plotoptionsis used to specify the options of addplot: addplot[plotoptions]
Returns
LaTeX code as a string.

Definition at line 134 of file PgfDataTable.java.

◆ formatPgfCurveAddPlot() [1/3]

String umontreal.ssj.stat.PgfDataTable.formatPgfCurveAddPlot ( int j1,
int j2,
int j3,
String plotoptions )

Similar to formatPgf, but outputs complete LaTeX code in an appropriate format that adds a curve of the three fields j3, j2, and j1 with the pgfplot package.

Parameters
j1first selected field.
j2second selected field.
j3third selected field.
plotoptionsis used to specify the options of addplot: addplot[plotoptions]
Returns
LaTeX code as a string.

Definition at line 232 of file PgfDataTable.java.

◆ formatPgfCurveAddPlot() [2/3]

String umontreal.ssj.stat.PgfDataTable.formatPgfCurveAddPlot ( int j1,
int j2,
String plotoptions )

Similar to formatTableTwoFields, but outputs complete LaTeX code in an appropriate format that adds a curve of the field j2 against field j1 with the pgfplot package.

Parameters
`j1`number of first selected field.
`j2`number of second selected field.
plotoptionsis used to specify the options of addplot in the pgfplot package: addplot[plotoptions]
Returns
LaTeX code as a String.

Definition at line 96 of file PgfDataTable.java.

◆ formatPgfCurveAddPlot() [3/3]

String umontreal.ssj.stat.PgfDataTable.formatPgfCurveAddPlot ( String xaxis,
String yaxis,
String plotoptions )

In this version, the two fields are specified by their names in the table.

Parameters
`xaxis`first selected field.
`yaxis`second selected field.
plotoptionsis used to specify the options of addplot in the pgfplot package: addplot[plotoptions]
Returns
LaTeX code as a String.

Definition at line 116 of file PgfDataTable.java.

◆ formatTable()

String umontreal.ssj.stat.PgfDataTable.formatTable ( )

Formats the full table as a String, with the field names in the first row, and the data points (observations) in the following rows.

This format can be used directly by the pgfplot package in Latex.

Returns
the table as a String.

Definition at line 53 of file PgfDataTable.java.

◆ formatTableThreeFields()

String umontreal.ssj.stat.PgfDataTable.formatTableThreeFields ( int j1,
int j2,
int j3 )

Similar to formatTableTwoFields(int, int), but for three fields.

Parameters
j1first selected field.
j2second selected field.
j3third selected field.
Returns
the table as a string.

Definition at line 210 of file PgfDataTable.java.

◆ formatTableTwoFields()

String umontreal.ssj.stat.PgfDataTable.formatTableTwoFields ( int j1,
int j2 )

Similar to formatTable, but retains only two selected columns of the table (i.e., two selected fields), specified by j1 and j2.

Note that the fields are numbered from 0.

Parameters
`j1`first selected field.
`j2`second selected field.
Returns
the table as a String.

Definition at line 76 of file PgfDataTable.java.


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