symbol.size: Little helper function to obtain bubble plots with simple...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Can be used within the cex argument of a plotting command (plot or points) to scale the symbols with regard to the values of a numeric variable. Thus, a bubble plot is computed.

Usage

1
symbol.size(x, cex.min = 0.2, cex.max = 5)

Arguments

x

A numeric vector giving the data for scaling the symbols in a scatter (however, you can scale everything that's got a cex argument). The vector must have the same length as x (and y) that give the plotting positions.

cex.min

The minimum size (scaling) of the plotted symbols.

cex.max

The maximum size (scaling) of the plotted symbols.

Details

The same, but in a mapping context can be achieved by bubble. Also symbols provides a comparable result. However, with symbol.size a very simple interface to bubble plots that can be used within regular scatter plot methods is given.

Value

A vector is returned with values between cex.min and cex.max that represent the values in the input vector x. After all, there is just a scaling applied. The vector is meant to be used to specifiy cex whereever appropriate.

Author(s)

Gerald Jurasinski

References

Tufte ER (1998) The visual display of quantitative information. Graphics Press. Cheshire, Connecticut.

See Also

bubble, symbols

Examples

1
2
3
4
5
6
7
8
9
# load abisko data that comes with simba
data(abis)

# take the environmental data end plot species richness at the field plot positions
with(abis.env, {plot(X, Y, cex=symbol.size(n.spec))})

# make kind of a multivariate plot in 3d:
# the relation between shannon, evenness, and simpson index (bubble size)
with(abis.env, {plot(shannon, even, cex=symbol.size(simps, cex.max=8))})

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