Adds Histogram to plots created or enhanced with colPoints
colPointsHist(z, nbins = 40, colors = seqPal(nbins), bb = seqR(z,
length.out = nbins + 1), at = pretty2(z), labels = at,
bg = "white", x1 = 0, x2 = 0.4, y1 = 0, y2 = 0.3,
outer = FALSE, mar = c(2, 2, 1, 0.5), mgp = c(1.8, 0.6, 0),
sborder = NA, resetfocus = TRUE, breaks = 20, freq = TRUE,
col = par("fg"), border = NA, main = "", ylab = "", xlab = "",
las = 1, axes = TRUE, ...)
Values of third dimension used in colPoints
Number of classes (thus, colors). DEFAULT: 40
Colors that are used for the background. DEFAULT: seqPal(nbins)
Borders of bins for the background. DEFAULT: seqR(z, length.out=nbins+1)
Positions of x-axis labels. DEFAULT: pretty2(z)
X-axis labels themselves. DEFAULT: at
Background behind background and axis labels. DEFAULT: "white"
Relative coordinates [0:1] of inset plot, see smallPlot
.
DEFAULT: x: 0-0.3, y: 0-0.4
Logical: Should legend be relative to device instead of current figure? use outer=TRUE when par(mfrow, oma) is set. DEFAULT: FALSE
Margins for smallPlot
. DEFAULT: c(2, 2, 1, 0.5)
MarGinPlacement: distance of xlab/ylab, numbers and line from plot margin,
as in par
, but with different defaults. DEFAULT: c(1.8, 0.6, 0)
Border around inset subplot. DEFAULT: par("fg")
Reset focus to original plot? Specifies where further low level plot commands are directed to. DEFAULT: TRUE
Breaks as in hist
, but with a different default. DEFAULT: 20
Plot count data in hist? (if FALSE, plot density instead). DEFAULT: TRUE
Color of histogram bars. DEFAULT: par("fg")
Border around each bar. DEFAULT: NA
Labels. DEFAULT: ""
LabelAxisStyle. DEFAULT: 1
Draw axes?. DEFAULT: TRUE
Further arguments passed to hist
. NOT POSSIBLE: x, add
invisible list of par of smallPlot, adds histogram to current plot
colPointsLegend
and colPoints
for real life examples
# NOT RUN {
z <- rnorm(50)
plot(1:10)
colPointsHist(z=z)
# }
Run the code above in your browser using DataLab