
Last chance! 50% off unlimited learning
Sale ends in
pltCharMat
uses output from charMat
to plot numerical matrices as characters.
- pltRCT
executes a (series of) plotting function(s) under the control of some useful switches, may be useful in source
.
- histRCT
creates a (series of) histogram(s), uses pltRCT
.
- SplomT
creates a scatterplot matrix with a) covariances (with
script size proportional to size) in the upper triangle, b) histograms
(with smoothing) and variable names in the diagonal, and c) scatterplot
with smoothes in y and x direction in the lower triangle, stressing high
correlations by nearly parallel lines. See figure in other documentation.
pltCharMat(m,...)
pltRCT(rows, cols, tit="", f = function(x) 0, cex = 1.5, reset = TRUE, outer = TRUE, oma = c(2, 2, 4, 2), mar = c(4, 4, 2, 1))
histRCT(data, rows = round(sqrt(ncol(data))), cols = ceiling(ncol(data)/rows), breaks = "Sturges", mainL = deparse(substitute(data)), mainC = colnames(eval(substitute(data))))
SplomT(data, mainL = deparse(substitute(data)), xlabL = "", hist = "h", adjust = 1, hist.col = trellis.par.get("strip.background")$col[5], cex.diag = 1, h.diag=0.4, colYonX = "red", colXonY = "blue", ...)
expression
, plotmath
will be used.tit
rows, cols
be restored after execution. See note
f
MUST NOT contain any call to
postscript
, because this would try to open another ps device without closing the old one! x <- rnorm(100); y <- rnorm(100)+1; z <- y+rlnorm(100)
pltRCT(1,1,f={plot(x,y,xlab="data with trend");
abline(reg=lm(y~x),lty=2);points(x,z,pch=3)})
nr <- 100; nc <- 8;
data <- as.data.frame(matrix(rnorm(nr*nc),nrow=nr,ncol=nc))
data[,nc] <- data[,nc-2] + 0.3*data[,nc-1] #generate higher correlations
data[,nc-1] <- data[,nc-1] + 0.9*data[,nc]
colnames(data)<-paste("vw",letters[1:nc],sep="")
SplomT(data,mainL="",hist="d",cex.diag=0.6,hist.col="green")
SplomT(data,mainL="",hist="b",adjust=0.4,cex.diag = 0.5)
pltRCT(1, 1, tit="1 by 1 plot", f=plot(y,x-3*y) )
nr <- 25; nc <- 16
pltRCT(1, 2, f={plot(x,y,xlab="my x")
m <- matrix(rnorm(nr*nc),nrow=25,ncol=nc)
pltCharMat(m,cex=0.5,col="red")
})
Run the code above in your browser using DataLab