plotMatrix: A scatterplot matrix with densities on the diagonal. In kingaa/aakmisc: Miscellany for the King Lab

Description

A special scatterplot matrix.

Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```plotMatrix(data, ...) ## S3 method for class 'list' plotMatrix(data, marg.exp = 0.02, labels = names(data), alpha = 1, pch = 16, size = unit(2, "mm"), ...) ## S3 method for class 'data.frame' plotMatrix(data, marg.exp = 0.02, labels = names(data), alpha = 1, pch = 16, size = unit(2, "mm"), ...) ## S3 method for class 'aakplot' print(x, newpage = is.null(vp), vp = NULL, ...) ```

Arguments

 `data` Data to plot. `...` optional arguments, passed to `hist`. `marg.exp` Fraction by which to expand the plot at the margins. `labels` Names of variables plotted. `alpha, pch, size` Refer to the plotted points in the scatterplots. `x` `plotMatrix` object to display. `newpage` logical; if `TRUE`, `grid.newpage()` will be called before the graphics are drawn. `vp` viewport to use. See `viewport`.

Author(s)

Aaron A. King kingaa at umich dot edu

Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20``` ``` ## Not run: x <- data.frame(a=rexp(n=1000,rate=1/3),b=rnorm(1000)) mutate(x,c=a+b^2,d=a-b^3) -> x print(plotMatrix(x,alpha=0.2)) g <- plotMatrix( x[-2], labels=c( expression(alpha), expression(beta), expression(phi) ), alpha=0.3 ) print(g) print(plotMatrix(as.list(x),alpha=0.2,breaks='scott')) ## End(Not run) ```

kingaa/aakmisc documentation built on Sept. 29, 2018, 9:33 p.m.