boxes: Adaption of boxplot.n.

Description Usage Arguments Author(s) See Also Examples

Description

boxes uses boxplot to produce a boxplot, which is then annotated with the number of obbservations in each group. Does allow for more flexibility compared to boxplot.n. Default size of the text is bigger and per default the numbers are not plotted directly on the x-axis and their distance from the axis can be changed.batons uses boxplot to create batonplots which give the same information but take up less space.

Usage

1
2
3
boxes(..., top = FALSE, shrink = 1, textcolor = NULL, yadj = NULL)

batons(..., waist = FALSE)

Arguments

...

Parameters passed to boxplot. To obtain batons the following boxplot-arguments are defined within the function and cannot changed by the user: boxwex=0, medpch=19, medcex=1.5, boxlwd=1.5, whisklty=4, outpch=4, outcex=.5.

top

Should the numbers of observations be printed below or above the boxes? Defaults to below (top = FALSE).

shrink

Parameter to scale the size of the numbers of observations. Above 1 increases size, below 1 until 0 decreases size.

textcolor

Color of the text. Defaults to NULL which than uses the actual plotting colour of the graphics device.

yadj

Can be used to adjust the vertical plotting positions of the numbers of observations. Defaults to NULL - no adjustment.

waist

TRUE for plotting a waist line to the baton that carries the same information like a notch on a boxplot.

Author(s)

Marian Koch marian.koch@uni-rostock.de, Gerald Jurasinski gerald.jurasinski@uni-rostock.de

See Also

boxplot, plot, boxplot.n

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
data(abis)

## see environmental data (see documentation on data for details)
abis.env

## calculate the difference in similarities for the three major  
## vegetation types
## therefore created a vector from the data expressing belonging
## to the vegetation types:
tcs.sub <- rep(0, 61)
tcs.sub[abis.env[,29]==1] <- 1
tcs.sub[abis.env[,30]==1] <- 2
tcs.sub[abis.env[,31]==1] <- 3

## calculate similarity (Jaccard) between all pairs of plots
abis.jacc <- sim(abis.spec, method="jaccard")

## make boxplots regarding the similarities for each vegetation
## type, including the number of pairs contained in each box.
boxes(as.matrix(abis.jacc)~tcs.sub, shrink=1.2)

## prettier
boxes(as.matrix(abis.jacc)~tcs.sub, notch=TRUE, col="grey50", 
shrink=1.2, ylim=c(-0.1, 0.9))

## make batonplots
batons(as.matrix(abis.jacc)~tcs.sub)

simba documentation built on May 1, 2019, 8:49 p.m.