plot_signifArea {plotfunctions} | R Documentation |
Creates a colored surface plot from data frame input.
Description
This function uses rasterImage
to
indicate which points in the surface are not significantly different from
zero. Note that the shape of these non-significant regions depends on the
number of data points (often specified with n.grid
).
Usage
plot_signifArea(data, view, predictor = NULL, valCI, col = 1, alpha = 0.5, ...)
Arguments
data |
Data frame with plot data. A data frame needs to have a
column with x values, a column with y values (specified in |
view |
A vector of length 2 with the names or numbers of the columns to plot on the x axis and y axis respectively. |
predictor |
The name of the column in the data frame
|
valCI |
The name of the column in the data frame
|
col |
Color for the nonsignificant areas. |
alpha |
Level of transparency, number between 0 (transparent) and 1 (no transparency) |
... |
Optional parameters for |
Author(s)
Jacolien van Rij
See Also
Examples
# From the package graphics, see help(image):
x <- 10*(1:nrow(volcano))
y <- 10*(1:ncol(volcano))
tmp <- data.frame(value = (as.vector(volcano) - 120),
x = 10*rep(1:nrow(volcano), ncol(volcano)),
y = 10*rep(1:ncol(volcano), each=nrow(volcano)),
CI = rep(20, nrow(volcano)*ncol(volcano)))
plotsurface(tmp, view=c('x', 'y'), predictor='value', main='Maunga Whau Volcano')
plot_signifArea(tmp, view=c('x', 'y'), predictor='value', valCI='CI')
# change color:
plotsurface(tmp, view=c('x', 'y'), predictor='value', main='Maunga Whau Volcano')
plot_signifArea(tmp, view=c('x', 'y'), predictor='value', valCI='CI',
col='red')
# or completely remove 'nonsignificant' area:
plot_signifArea(tmp, view=c('x', 'y'), predictor='value', valCI='CI',
col='white', alpha=1)