na.points | R Documentation |
Add 1-D scatter plot to plot margins for missing values.
na.points(
x = NULL,
y = NULL,
xat = NULL,
yat = NULL,
label = "NA",
args.beeswarm = list(),
...
)
x , y |
vectors of data to be plotted; if only one is given, all points
will be plotted on the corresponding axis; if both are given, only
|
xat , yat |
the x- and y-axis positions for points |
label |
axis label for points; use |
args.beeswarm |
a named list of additional arguments passed to
|
... |
additional arguments passed to |
op <- par(mar = c(5, 5, 5, 5))
plot(mpg ~ wt, mtcars)
na.points(y = mtcars$mpg, col = 'red')
na.points(x = mtcars$wt, pch = 16, cex = 1.5, col = 'blue')
plot(mpg ~ wt, mtcars, bty = 'l')
na.points(x = mtcars$wt, yat = par('usr')[4], label = 'Missing',
args.beeswarm = list(corral = 'wrap', corralWidth = 1.5))
plot(mpg ~ wt, mtcars, col = rep(1:2, each = 10))
na.points(replace(mtcars$wt, 1:10, NA), replace(mtcars$mpg, 11:20, NA), col = 2)
par(op)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.