mplot3
Scatter plot with marginal density and/or histogramDraw a scatter plot with fit line and marginal density and/or histogram
mplot3.xym(x, y, margin = c("histogram", "density", "both"),
fit = "gam", se.fit = TRUE, xlim = NULL, ylim = NULL,
col = "#18A3AC", density.alpha = 0.66, hist.breaks = 30,
hist.alpha = 0.66, hist.space = 0.05, hist.lwd = 3, lwd = 4,
main = NULL, main.adj = 0, axes.density = FALSE, pty = "m",
mar = c(3, 3, 0, 0), mar.mar = 0.2, axes = TRUE, xaxs = "r",
yaxs = "r", theme = getOption("rt.theme", "lightgrid"),
par.reset = TRUE, widths = c(5, 1), heights = c(1, 5),
filename = NULL, pdf.width = 7, pdf.height = 7, ...)
x-data
y-data
What type of marginal plots to draw. Options: "density", "histogram", or "both"
What model to use to draw y ~ x
. Options: mode.select()
Logical: If TRUE: plot +/- 2 * Standard Error of fit
Float vector, length 2: x-axis limits
Float vector, length 2: y-axis limits
Color for marginal plots
Alpha for density plots
Integer. Number of histogram breaks
Alpha for barplots
Space between bars in barplots
Float: Line width
String: Main title
Float: Plot title alignment (0 = left, .5 = center, 1 = right)
Logical: If TRUE, plot margin plot axes for density (debugging only)
"s" gives a square plot, "m" gives a plot that fills graphics device size. Defaults to "s"
(See ?par
)
Vector, length 4: Margins; see mar
in ?par
Logical: Should the axes be drawn? Defaults to TRUE
String: "light", "dark", "lightgrid", "darkgrid", "lightbox", "darkbox"
Default = "lightgrid" if no default "rt.fit"
is set using options
.
You can set a system-wide default in your .Rprofile
by including a line like
options(rt.theme = 'lightgrid')
Logical. Resest par
to original settings
Additional arguments to be passed to mplot3.xy
At the moment, mplot3.xym
is the only mplot3
function that does not support