Description Usage Arguments Details Value Author(s) See Also Examples
Several panel plots that can be used with pairs()
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | panel_boxplot(x, col = par("col"), box.col = "cornsilk", ...)
panel.boxplot(x, col = par("col"), box.col = "cornsilk", ...)
panel_density(x, adjust = 1, rug = TRUE, col = par("col"),
lwd = par("lwd"), line.col = col, line.lwd = lwd, ...)
panel.density(x, adjust = 1, rug = TRUE, col = par("col"),
lwd = par("lwd"), line.col = col, line.lwd = lwd, ...)
panel_hist(x, breaks = "Sturges", hist.col = "cornsilk",
hist.border = NULL, hist.density = NULL, hist.angle = 45, ...)
panel.hist(x, breaks = "Sturges", hist.col = "cornsilk",
hist.border = NULL, hist.density = NULL, hist.angle = 45, ...)
panel_qqnorm(x, pch = par("pch"), col = par("col"), bg = par("bg"),
cex = par("cex"), lwd = par("lwd"), qq.pch = pch, qq.col = col,
qq.bg = bg, qq.cex = cex, qqline.col = qq.col, qqline.lwd = lwd, ...)
panel.qqnorm(x, pch = par("pch"), col = par("col"), bg = par("bg"),
cex = par("cex"), lwd = par("lwd"), qq.pch = pch, qq.col = col,
qq.bg = bg, qq.cex = cex, qqline.col = qq.col, qqline.lwd = lwd, ...)
|
x |
A numeric vector. |
col |
The color of the points. |
box.col |
The filling color of the boxplots. |
... |
Further arguments to plot functions, or functions that construct
items, like |
adjust |
The bandwidth adjustment factor, see |
rug |
Do we add a rug representation (1-d plot) of the points too? |
lwd |
The line width. |
line.col |
The color of the line. |
line.lwd |
The width of the line. |
breaks |
The number of breaks, the name of a break algorithm, a vector
of breakpoints, or any other acceptable value for |
hist.col |
The filling color for the histograms. |
hist.border |
The border color for the histograms. |
hist.density |
The density for filling lines in the histograms. |
hist.angle |
The angle for filling lines in the histograms. |
pch |
The symbol used for the points. |
bg |
The background color for symbol used for the points. |
cex |
The expansion factor used for the points. |
qq.pch |
The symbol used to plot points in the QQ-plots. |
qq.col |
The color of the symbol used to plot points in the QQ-plots. |
qq.bg |
The background color of the symbol used to plot points in the QQ-plots. |
qq.cex |
The expansion factor for points in the QQ-plots. |
qqline.col |
The color for the QQ-plot lines. |
qqline.lwd |
The width for the QQ-plot lines. |
Panel functions panel_boxplot()
, panel_density()
, panel_hist()
and panel_qqnorm()
should be used only to plot univariate data on the
diagonals of pair plots (or scatterplot matrix).
These functions return nothing and are used for their side effect of plotting in panels of composite plots.
Philippe Grosjean phgrosjean@sciviews.org, but code inspired from
spm()
in package car.
pairs()
, boxplot()
, hist()
, density()
, qqnorm()
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Example of scatterplot matrices with custom plots on the diagonal
# Boxplots
pairs(trees, panel = panel_smooth, diag.panel = panel_boxplot)
pairs(trees, diag.panel = panel_boxplot, box.col = "gray")
# Densities
pairs(trees, panel = panel_smooth, diag.panel = panel_density)
pairs(trees, diag.panel = panel_density, line.col = "red", adjust = 0.5)
# Histograms
pairs(trees, panel = panel_smooth, diag.panel = panel_hist)
pairs(trees, diag.panel = panel_hist, hist.col = "gray", breaks = "Scott")
# QQ-plots against Normal theoretical distribution
pairs(trees, panel = panel_smooth, diag.panel = panel_qqnorm)
pairs(trees, diag.panel = panel_qqnorm, qqline.col = 2, qq.cex = .5, qq.pch = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.