This class provides tools to plot the density and the cumulative probability of a continuous probability distribution. More...
Public Member Functions | |
| ContinuousDistChart (ContinuousDistribution dist, double a, double b, int m) | |
| Constructor for a new ContinuousDistChart instance. | |
| JFrame | viewCdf (int width, int height) |
| Displays a chart of the cumulative distribution function (cdf) on the screen using Swing. | |
| JFrame | viewDensity (int width, int height) |
| Similar to viewCdf, but for the probability density instead of the cdf. | |
| String | toLatexCdf (int width, int height) |
| Exports a chart of the cdf to a LaTeX source code using PGF/TikZ. | |
| String | toLatexDensity (int width, int height) |
| Similar to toLatexCdf, but for the probability density instead of the cdf. | |
| void | setParam (double a, double b, int m) |
| Sets the parameters \(a\), \(b\) and \(m\) for this object. | |
This class provides tools to plot the density and the cumulative probability of a continuous probability distribution.
Definition at line 37 of file ContinuousDistChart.java.
| umontreal.ssj.charts.ContinuousDistChart.ContinuousDistChart | ( | ContinuousDistribution | dist, |
| double | a, | ||
| double | b, | ||
| int | m ) |
Constructor for a new ContinuousDistChart instance.
It will plot the continuous distribution dist over the interval \([a,b]\), using \(m+1\) equidistant sample points.
| dist | continuous distribution to plot |
| a | lower bound of interval |
| b | upper bound of interval |
| m | number of steps |
Definition at line 90 of file ContinuousDistChart.java.
| void umontreal.ssj.charts.ContinuousDistChart.setParam | ( | double | a, |
| double | b, | ||
| int | m ) |
Sets the parameters \(a\), \(b\) and \(m\) for this object.
| a | lower bound of interval |
| b | upper bound of interval |
| m | number of points in the plot minus one |
Definition at line 158 of file ContinuousDistChart.java.
| String umontreal.ssj.charts.ContinuousDistChart.toLatexCdf | ( | int | width, |
| int | height ) |
Exports a chart of the cdf to a LaTeX source code using PGF/TikZ.
This method constructs and returns a string that can be written to a LaTeX document to render the plot. width and height represents the width and the height of the produced chart. These dimensions do not take into account the axes and labels extra space. The width and the height of the chart are measured in centimeters.
| width | Chart’s width in centimeters |
| height | Chart’s height in centimeters |
Definition at line 136 of file ContinuousDistChart.java.
| String umontreal.ssj.charts.ContinuousDistChart.toLatexDensity | ( | int | width, |
| int | height ) |
Similar to toLatexCdf, but for the probability density instead of the cdf.
| width | Chart’s width in centimeters |
| height | Chart’s height in centimeters |
Definition at line 147 of file ContinuousDistChart.java.
| JFrame umontreal.ssj.charts.ContinuousDistChart.viewCdf | ( | int | width, |
| int | height ) |
Displays a chart of the cumulative distribution function (cdf) on the screen using Swing.
This method creates an application containing a chart panel displaying the chart. The created frame is positioned on-screen, and displayed before it is returned. The width and the height of the chart are measured in pixels.
| width | frame width in pixels |
| height | frame height in pixels |
Definition at line 109 of file ContinuousDistChart.java.
| JFrame umontreal.ssj.charts.ContinuousDistChart.viewDensity | ( | int | width, |
| int | height ) |
Similar to viewCdf, but for the probability density instead of the cdf.
| width | frame width in pixels |
| height | frame height in pixels |
Definition at line 120 of file ContinuousDistChart.java.