## S4 method for signature 'SUNdistr'plot(x, range, nlevels =8, levels, npt, main, comp, compLabs, gap =0.5,...)
Arguments
x: an object of class SUNdistr
range: in the univariate case, a vector of length 2 which defines the plotting range; in the multivariate case, a matrix with two rows where each column defines the plotting range of the corresponding component variable. If missing, a sensible choice is made.
nlevels: number of contour levels desired iff levels is not supplied.
levels: numeric vector of levels at which to draw contour lines.
npt: a numeric value or vector (in the univariate and in the multivariate case, respectively) to assign the number of evaluation points of the distribution, on an equally-spaced grid over the range
defined above. Default value: 251 in the univariate case, a vector of 101's in the multivariate case.
main: a character string for main title; if missing, one is built from the available ingredients.
comp: an optional integer vector representing the subset of the vector 1:d, if d denotes the dimensionality of the distribution.
compLabs: a vector of character strings or expressions used to label the variables in the plot; if missing, slot(object,"compNames")[comp] is used.
gap: a numeric value which regulates the gap between panels of a multivariate plot when d>2; default: 0.5.
...: additional graphical parameters
Details
For univariate density plots, probs are used to compute quantiles from the appropriate distribution, and these are superimposed to the plot of the density function, unless probs=NULL. In the multivariate case, each bivariate plot is constructed as a collection of contour curves, one curve for each probability level; consequently, probs cannot be missing or NULL. The level of the density contour lines are chosen so that each curve circumscribes a region with the quoted probability, to a good degree of approssimation; for additional information, see Azzalini and Capitanio (2014), specifically Complement 5.2 and p.179, and references therein.
Returns
an invisible list. In the univariate case the list has three components: the input object representing the distribution and two numeric vectors with the coordinates of the plotted density values. In the multivariate case, the first element of the list is the input object representing the distribution and all subsequent list elements are lists with components of the panels comprising the matrix plot; the elements of these sub-lists are: the vectors of x and y coordinates, the names of the variables, the density values at the (x,y) points, a vector of the density levels of the curves appearing in each panel plot.