|
SSJ
3.3.1
Stochastic Simulation in Java
|
This class extends the class umontreal.ssj.charts.XYLineChart. More...
Public Member Functions | |
| YListChart () | |
| Empty constructor. | |
| YListChart (String title, String XLabel, String YLabel, double[]... data) | |
Initializes a new YListChart instance with set of points data. More... | |
| YListChart (String title, String XLabel, String YLabel, boolean flag, double[]... data) | |
| Similar to the constructor YListChart(title, XLabel, YLabel, data) above. More... | |
| YListChart (String title, String XLabel, String YLabel, double[] data, int numPoints) | |
Initializes a new YListChart instance with a set of points data. More... | |
| YListChart (String title, String XLabel, String YLabel, double h, double[] data, int numPoints) | |
| Similar to the constructor YListChart(title, XLabel, YLabel, data, numPoints) above, but the points are \((h(j+1), \mbox{\texttt{data}}[j])\). More... | |
| YListChart (String title, String XLabel, String YLabel, double[][] data, int numPoints) | |
Initializes a new YListChart instance with set of points data. More... | |
Public Member Functions inherited from XYLineChart | |
| XYLineChart () | |
Initializes a new XYLineChart instance with an empty data set. | |
| XYLineChart (String title, String XLabel, String YLabel, double[][]... data) | |
Initializes a new XYLineChart instance with sets of points data. More... | |
| XYLineChart (String title, String XLabel, String YLabel, double[][] data, int numPoints) | |
Initializes a new XYLineChart instance with sets of points data. More... | |
| XYLineChart (String title, String XLabel, String YLabel, double[][] data, int x, int y) | |
Initializes a new XYLineChart instance using subsets of data. More... | |
| XYLineChart (String title, String XLabel, String YLabel, DoubleArrayList... data) | |
Initializes a new XYLineChart instance with data data. More... | |
| XYLineChart (String title, String XLabel, String YLabel, XYSeriesCollection data) | |
Initializes a new XYLineChart instance with data data. More... | |
| int | add (double[] x, double[] y, String name, String plotStyle) |
| Adds a data series into the series collection. More... | |
| int | add (double[] x, double[] y) |
| Adds a data series into the series collection. More... | |
| int | add (double[] x, double[] y, int numPoints) |
| Adds a data series into the series collection. More... | |
| int | add (double[][] data) |
Adds the new collection of data series data into the series collection. More... | |
| int | add (double[][] data, int numPoints) |
Adds the new collection of data series data into the series collection. More... | |
| XYListSeriesCollection | getSeriesCollection () |
| Returns the chart’s dataset. More... | |
| void | setSeriesCollection (XYListSeriesCollection dataset) |
| Links a new dataset to the current chart. More... | |
| void | setTicksSynchro (int s) |
| Synchronizes \(X\)-axis ticks to the \(s\)-th series \(x\)-values. More... | |
| JFrame | view (int width, int height) |
| Displays chart on the screen using Swing. More... | |
| JFrame | viewBar (int width, int height) |
| Displays bar chart on the screen using Swing. More... | |
| String | toLatex (double width, double height) |
Public Member Functions inherited from XYChart | |
| JFreeChart | getJFreeChart () |
Returns the JFreeChart object associated with this chart. More... | |
| Axis | getXAxis () |
| Returns the chart’s domain axis ( \(x\)-axis) object. More... | |
| Axis | getYAxis () |
| Returns the chart’s range axis ( \(y\)-axis) object. More... | |
| abstract JFrame | view (int width, int height) |
| Displays chart on the screen using Swing. | |
| String | getTitle () |
| Gets the current chart title. More... | |
| void | setTitle (String title) |
| Sets a title to this chart. More... | |
| void | setprobFlag (boolean flag) |
Must be set true when plotting probabilities, false otherwise. More... | |
| void | setAutoRange () |
| The \(x\) and the \(y\) ranges of the chart are set automatically. | |
| void | setAutoRange (boolean right, boolean top) |
| The \(x\) and the \(y\) ranges of the chart are set automatically. More... | |
| void | setAutoRange00 (boolean xZero, boolean yZero) |
| The \(x\) and the \(y\) ranges of the chart are set automatically. More... | |
| void | setManualRange (double[] range) |
Sets the \(x\) and \(y\) ranges of the chart using the format: range = [xmin, xmax, ymin, ymax]. More... | |
| void | setManualRange (double[] range, boolean right, boolean top) |
Sets the \(x\) and \(y\) ranges of the chart using the format: range = [xmin, xmax, ymin, ymax]. More... | |
| void | setManualRange00 (double[] range, boolean xZero, boolean yZero) |
Sets the \(x\) and \(y\) ranges of the chart using the format: range = [xmin, xmax, ymin, ymax]. More... | |
| double | getChartMargin () |
| Returns the chart margin, which is the fraction by which the chart is enlarged on its borders. More... | |
| void | setChartMargin (double margin) |
Sets the chart margin to margin. More... | |
| abstract void | setTicksSynchro (int s) |
| Synchronizes \(x\)-axis ticks to the \(s\)-th series \(x\)-values. More... | |
| void | drawVerticalLine (double x, String name, double yfrac, boolean right) |
Draws a vertical line on the chart at \(x\)-coordinate x. More... | |
| void | enableGrid (double xstep, double ystep) |
| Puts a grid on the background. More... | |
| void | disableGrid () |
| Disables the background grid. | |
| abstract String | toLatex (double width, double height) |
| Exports the chart to a LaTeX source code using PGF/TikZ. More... | |
| void | toLatexFile (String fileName, double width, double height) |
Transforms the chart to LaTeX form and writes it in file fileName. More... | |
| void | setLatexDocFlag (boolean flag) |
Flag to remove the \documentclass (and other) commands in the created LaTeX files. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from XYLineChart | |
| void | init (String title, String XLabel, String YLabel) |
| void | initAxis () |
Protected Member Functions inherited from XYChart | |
| void | setAutoRange (boolean xZero, boolean yZero, boolean right, boolean top) |
| void | setTick0Flags () |
| double | computeXScale (double position) |
| double | computeYScale (double position) |
| double | computeScale (double[] bounds) |
Protected Attributes inherited from XYChart | |
| Axis | XAxis |
| Axis | YAxis |
| SSJXYSeriesCollection | dataset |
| JFreeChart | chart |
| boolean | latexDocFlag = true |
| boolean | autoRange |
| double [] | manualRange |
| boolean | grid = false |
| double | xstepGrid |
| double | ystepGrid |
| boolean | probFlag = false |
| double | chartMargin = 0.02 |
This class extends the class umontreal.ssj.charts.XYLineChart.
Each YListChart object is associated with a umontreal.ssj.charts.YListSeriesCollection data set. The data is given as one or more lists of \(y\)-coordinates. The \(x\)-coordinates are regularly-spaced multiples of the indices of the data points.
| YListChart | ( | String | title, |
| String | XLabel, | ||
| String | YLabel, | ||
| double... [] | data | ||
| ) |
Initializes a new YListChart instance with set of points data.
title is a title, XLabel is a short description of the \(x\)-axis, and YLabel a short description of the \(y\)-axis. The input vectors represents a set of plotting data. More specifically, each vector data represents a \(y\)-coordinates set. Position in the vector will form the \(x\)-coordinates. Indeed, the value data \([j]\) corresponds to the point \((j+1, \mathtt{data}[j])\) (but rescaled) on the chart.
| title | chart title. |
| XLabel | Label on \(x\)-axis. |
| YLabel | Label on \(y\)-axis. |
| data | series of point sets. |
| YListChart | ( | String | title, |
| String | XLabel, | ||
| String | YLabel, | ||
| boolean | flag, | ||
| double... [] | data | ||
| ) |
Similar to the constructor YListChart(title, XLabel, YLabel, data) above.
Except that if flag is true, the points are \((j+1, \mbox{\texttt{data}}[j])\) for each series; but if flag is false, the points are \(((j+1)/n, \mbox{\texttt{data}}[j])\), where \(n\) is the number of points of each series in data.
| title | chart title. |
| XLabel | Label on \(x\)-axis. |
| YLabel | Label on \(y\)-axis. |
| flag | to choose the step between \(x\)-coordinates |
| data | series of point sets. |
| YListChart | ( | String | title, |
| String | XLabel, | ||
| String | YLabel, | ||
| double [] | data, | ||
| int | numPoints | ||
| ) |
Initializes a new YListChart instance with a set of points data.
title is a title, XLabel is a short description of the \(x\)-axis, and YLabel a short description of the \(y\)-axis. The input vector represents a set of plotting data. Position in the vector gives the \(x\)-coordinates of the curve. The value data \([j]\) corresponds to the point \((j+1\), data \([j]\)) (but rescaled on the chart) for the curve. However, only the first numPoints of data will be considered to plot the curve.
| title | chart title. |
| XLabel | Label on \(x\)-axis. |
| YLabel | Label on \(y\)-axis. |
| data | point set. |
| numPoints | number of points to plot |
| YListChart | ( | String | title, |
| String | XLabel, | ||
| String | YLabel, | ||
| double | h, | ||
| double [] | data, | ||
| int | numPoints | ||
| ) |
Similar to the constructor YListChart(title, XLabel, YLabel, data, numPoints) above, but the points are \((h(j+1), \mbox{\texttt{data}}[j])\).
| title | chart title. |
| XLabel | Label on \(x\)-axis. |
| YLabel | Label on \(y\)-axis. |
| h | step between \(x\)-coordinates |
| data | point set. |
| numPoints | number of points to plot |
| YListChart | ( | String | title, |
| String | XLabel, | ||
| String | YLabel, | ||
| double | data[][], | ||
| int | numPoints | ||
| ) |
Initializes a new YListChart instance with set of points data.
title is a title, XLabel is a short description of the \(x\)-axis, and YLabel a short description of the \(y\)-axis. The input vectors represents a set of plotting data. More specifically, for a \(n\)-row matrix data, each row data \([i], i=0,…, n-1\), represents a \(y\)-coordinate set for a curve. Position in the vector gives the \(x\)-coordinates of the curves. Indeed, the value data \([i][j]\) corresponds to the point \((j+1\), data \([i][j]\)) (but rescaled on the chart) for curve \(i\). However, only the first numPoints of each data \([i]\) will be considered to plot each curve.
| title | chart title. |
| XLabel | Label on \(x\)-axis. |
| YLabel | Label on \(y\)-axis. |
| data | series of point sets. |
| numPoints | number of points to plot |
1.8.14