plotMatrix: A scatterplot matrix with densities on the diagonal.

plotMatrixR Documentation

A scatterplot matrix with densities on the diagonal.

Description

A special scatterplot matrix.

Usage

plotMatrix(data, ...)

## S3 method for class 'list'
plotMatrix(
  data,
  marg.exp = 0.02,
  labels = names(data),
  alpha = 1,
  pch = 16,
  size = unit(0.03, "npc"),
  ...
)

## S3 method for class 'data.frame'
plotMatrix(
  data,
  marg.exp = 0.02,
  labels = names(data),
  alpha = 1,
  pch = 16,
  size = unit(0.03, "npc"),
  ...
)

## 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.

Examples


  ## 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 April 3, 2024, 1:33 a.m.