DOT {easyCODA}R Documentation

Dot plot

Description

Simple dot plot of original data

Usage

DOT(data, cols=NA, names=NA, groups=NA, pch=NA, horizon=FALSE, jitter=1, 
     xscale=NA, xscalefac=1, yaxis=TRUE, shownames=TRUE, main="", ylab="", 
     xlim=c(NA,NA), ylim=c(NA, NA), cex=1)

Arguments

data

Matrix or data frame with data groups in columns; alternatively, a single vector but then groups (if any) have to specified with the groups option

cols

Colours of points for each sample, default rainbow

names

Labels for variables, by default the column names of data, or group names

groups

Group codes to split the data vector into separate plots

pch

Point character

horizon

TRUE if horizontal gray dashed lines required at "nice" y-values (default FALSE, not implemented yet)

jitter

1 by default, increase or decrease slightly for more jitter

xscale

User-supplied positions of points on horizontal axis

xscalefac

1 by default, rescale the positions on horizontal axis

yaxis

TRUE by default, FALSE to suppress and optionally add afterwards

shownames

TRUE by default; FALSE to not show group names and add them externally

main

Heading

ylab

Vertical axis label

xlim

Horizontal axis limits

ylim

Vertical axis limits

cex

Character size adjustment for labels

Details

The function DOT makes a dot plot for specified groups of points, which can be in columns of a matrix or data frame, or in a single vector with group codes specified separately.

Author(s)

Michael Greenacre

References

Greenacre, M. (2016), Data reporting and visualization in ecology, Polar Biology, 39:2189-2205.

See Also

BAR

Examples

# Dot plot of columns of Vegetables data set
data(veg)
DOT(veg)
# Dot plot of domestic work column of TimeBudget data set, split by sex
data(time)
DOT(time[,2], groups=substr(rownames(time),3,3), cols=c("blue","red"), ylim=c(0,20), 
    jitter=2, main="Percentage of Domestic Work")

[Package easyCODA version 0.34.3 Index]