|
SSJ
3.3.1
Stochastic Simulation in Java
|
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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| String | formatPgfCurveAddPlot (String xaxis, String yaxis, String plotoptions) |
| In this version, the two fields are specified by their names in the table. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
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. More... | |
| static String | pgfplotFileHeader () |
| static String | pgfplotEndDocument () |
Package Attributes | |
| String | tableName |
| String | tableLabel |
| String [] | fields |
| double [][] | data |
| int | numFields |
| int | numObservations |
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.
| PgfDataTable | ( | String | tableName, |
| String | tableLabel, | ||
| String [] | fields, | ||
| double | data[][] | ||
| ) |
Constructs a table with the given table name, array of field names, and data observations.
| tableName | Name (descriptor) of the table. |
| tableLabel | A label (very short name) for the table, to be used in plots to identify curves. |
| fields | The names of the fields (the variables). |
| data | The data points; the entry data[s] contains observation s. |
|
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.
| title | is the title of the plot. |
| j1 | first selected field. |
| j2 | second selected field. |
| listCurves | there will be one curve for each table in this list. |
| loglog | says if we want a log-log plot (true) or not (false). |
| plotoptions | is used to specify the options of addplot: addplot[plotoptions] |
| 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.
| title | is the title of the plot. |
| j1 | first selected field. |
| j2 | second selected field. |
| loglog | says if we want a log-log plot (true) or not (false). |
| plotoptions | is used to specify the options of addplot: addplot[plotoptions] |
| 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.
| titleis | the title of the plot. |
| j1 | first selected field. |
| j2 | second selected field. |
| j3 | third selected field. |
| loglog | says if we want a log-log plot (true) or not (false). |
| plotoptions | is used to specify the options of addplot: addplot[plotoptions] |
| 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.
| <tt>j1</tt> | number of first selected field. |
| <tt>j2</tt> | number of second selected field. |
| plotoptions | is used to specify the options of addplot in the pgfplot package: addplot[plotoptions] |
String. | String formatPgfCurveAddPlot | ( | String | xaxis, |
| String | yaxis, | ||
| String | plotoptions | ||
| ) |
In this version, the two fields are specified by their names in the table.
| <tt>xaxis</tt> | first selected field. |
| <tt>yaxis</tt> | second selected field. |
| plotoptions | is used to specify the options of addplot in the pgfplot package: addplot[plotoptions] |
String. | 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.
| j1 | first selected field. |
| j2 | second selected field. |
| j3 | third selected field. |
| plotoptions | is used to specify the options of addplot: addplot[plotoptions] |
| 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.
This format can be used directly by the pgfplot package in Latex.
String. | String formatTableThreeFields | ( | int | j1, |
| int | j2, | ||
| int | j3 | ||
| ) |
Similar to formatTableTwoFields(int, int), but for three fields.
| j1 | first selected field. |
| j2 | second selected field. |
| j3 | third selected field. |
| 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.
Note that the fields are numbered from 0.
| <tt>j1</tt> | first selected field. |
| <tt>j2</tt> | second selected field. |
String.
1.8.14