jmplot | R Documentation |
Joint and marginal distributions scatterplots with tplot
s on
margins.
jmplot(
x,
y,
z,
main = "",
sub = "",
xlab = NULL,
ylab = NULL,
names = NULL,
xlim = NULL,
ylim = NULL,
axes = TRUE,
frame.plot = axes,
log = "",
xratio = 0.8,
yratio = xratio,
show.n = TRUE,
show.na = show.n,
cex.n = 1,
ann = par("ann"),
asp = NA,
panel.first = NULL,
panel.last = NULL,
...
)
x, y |
x- and y-axis variables |
z |
grouping variable |
main, sub |
main- and sub-titles (below x-axis) for the plot |
xlab, ylab |
x- and y-axis labels |
names |
labels for |
xlim, ylim |
x- and y-axis limits |
axes |
logical; draw axes |
frame.plot |
logical; draw box around |
log |
|
xratio, yratio |
proportion of x- and y-axes allotted for scatterplots;
see |
show.n, show.na |
logical; show total and missing in each group |
cex.n |
size of |
ann |
logical; annotate plot |
asp |
numeric, giving the aspect ratio y/x; see
|
panel.first |
an "expression" to be evaluated after the plot axes are
set up but before any plotting takes place; this can be useful for drawing
background grids or scatterplot smooths; note that this works by lazy
evaluation: passing this argument from other plot methods may well not work
since it may be evaluated too early; see also |
panel.last |
an expression to be evaluated after plotting has taken
place but before the axes, title, and box are added; see the comments about
|
... |
further arguments passed to |
A list with elements x
and y
corresponding to boxplots
on x- and y-axes, respectively. See boxplot
or
tplot
for a detailed description of each list.
Tatsuki
jmplot
; tplot
; boxplot
set.seed(1)
dat <- data.frame(
x = rnorm(100, 20, 5),
y = rexp(100),
z = c('M', 'F'),
zz = c(LETTERS[1:4])
)
with(dat, {
jmplot(x, y, zz, type = 'db', jit = 0.02, col = 1:4, las = 1, cex.n = 0.5,
group.col = TRUE, pch = 1:4, group.pch = TRUE, boxcol = grey(0.9))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.