View source: R/colPointsHist.R
colPointsHist | R Documentation |
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,
...
)
z |
Values of third dimension used in |
nbins |
Number of classes (thus, colors). DEFAULT: 40 |
colors |
Colors that are used for the background. DEFAULT: seqPal(nbins) |
bb |
Borders of bins for the background. DEFAULT: seqR(z, length.out=nbins+1) |
at |
Positions of x-axis labels. DEFAULT: pretty2(z) |
labels |
X-axis labels themselves. DEFAULT: at |
bg |
Background behind background and axis labels. DEFAULT: "white" |
x1 , x2 , y1 , y2 |
Relative coordinates [0:1] of inset plot, see |
outer |
Logical: Should legend be relative to device instead of current figure? use outer=TRUE when par(mfrow, oma) is set. DEFAULT: FALSE |
mar |
Margins for |
mgp |
MarGinPlacement: distance of xlab/ylab, numbers and line from plot margin,
as in |
sborder |
Border around inset subplot. DEFAULT: par("fg") |
resetfocus |
Reset focus to original plot? Specifies where further low level plot commands are directed to. DEFAULT: TRUE |
breaks |
Breaks as in |
freq |
Plot count data in hist? (if FALSE, plot density instead). DEFAULT: TRUE |
col |
Color of histogram bars. DEFAULT: par("fg") |
border |
Border around each bar. DEFAULT: NA |
main , ylab , xlab |
Labels. DEFAULT: "" |
las |
LabelAxisStyle. DEFAULT: 1 |
axes |
Draw axes?. DEFAULT: TRUE |
... |
Further arguments passed to |
invisible list of par of smallPlot, adds histogram to current plot
Berry Boessenkool, berry-b@gmx.de, Aug 2014
colPointsLegend
and colPoints
for real life examples
z <- rnorm(50)
plot(1:10)
colPointsHist(z=z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.