mplot3_xym | R Documentation |
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 = rtTheme,
par.reset = TRUE,
widths = NULL,
heights = NULL,
filename = NULL,
pdf.width = 7,
pdf.height = 7,
...
)
x |
x-data |
y |
y-data |
margin |
What type of marginal plots to draw. Options: "density", "histogram", or "both" |
fit |
What model to use to draw |
se.fit |
Logical: If TRUE: plot +/- 2 * Standard Error of fit |
xlim |
Float vector, length 2: x-axis limits |
ylim |
Float vector, length 2: y-axis limits |
col |
Color for marginal plots |
density.alpha |
Alpha for density plots |
hist.breaks |
Integer. Number of histogram breaks |
hist.alpha |
Alpha for barplots |
hist.space |
Space between bars in barplots |
lwd |
Float: Line width |
main |
Character: Main title |
axes.density |
Logical: If TRUE, plot margin plot axes for density (debugging only) |
pty |
Character: "s" gives a square plot; "m" gives a plot that fills
graphics device size. Default = "m" (See |
mar |
Float, vector, length 4: Margins; see |
xaxs |
Character: "r": Extend plot x-axis limits by 4% on either end; "i": Use exact x-axis limits. |
yaxs |
Character: as |
theme |
Character: Run |
par.reset |
Logical. Resest |
filename |
Character: Path to file to save plot. Default = NULL |
pdf.width |
Float: Width in inches for pdf output (if |
pdf.height |
Float: Height in inches for pdf output. |
... |
Additional arguments to be passed to |
At the moment, mplot3_xym
is the only mplot3
function that does not support
To make wide plot, change widths
: e.g. widths = c(7, 1)
E.D. Gennatas
## Not run:
x <- rnorm(500)
y <- x^3 + 12 + rnorm(500)
mplot3_xym(x, y)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.