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. | |
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.
| 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.
| 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. |
Definition at line 36 of file PgfDataTable.java.
|
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] |
Definition at line 179 of file PgfDataTable.java.
| 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.
| 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] |
Definition at line 256 of file PgfDataTable.java.
| 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.
| 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.
| 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] |
Definition at line 134 of file PgfDataTable.java.
| 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.
| j1 | first selected field. |
| j2 | second selected field. |
| j3 | third selected field. |
| plotoptions | is used to specify the options of addplot: addplot[plotoptions] |
Definition at line 232 of file PgfDataTable.java.
| 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.
| `j1` | number of first selected field. |
| `j2` | number of second selected field. |
| plotoptions | is used to specify the options of addplot in the pgfplot package: addplot[plotoptions] |
Definition at line 96 of file PgfDataTable.java.
| 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.
| `xaxis` | first selected field. |
| `yaxis` | second selected field. |
| plotoptions | is used to specify the options of addplot in the pgfplot package: addplot[plotoptions] |
Definition at line 116 of file PgfDataTable.java.
| 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.
Definition at line 53 of file PgfDataTable.java.
| String umontreal.ssj.stat.PgfDataTable.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. |
Definition at line 210 of file PgfDataTable.java.
| 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.
| `j1` | first selected field. |
| `j2` | second selected field. |
Definition at line 76 of file PgfDataTable.java.