Learn R Programming

swfscMisc (version 1.6.5)

sex.symbols: Sex Symbols

Description

Plots male and female symbols on current plot.

Usage

sex.symbols(x, y, sex = 1, col = par("fg"), lwd = par("lwd"), cex = 1)

Arguments

x, y

the x and y coordinates on the current plot.

sex

a numeric vector containing the values 1 (male) or 2 (female). If of length one, then value is recycled for all symbols.

col, lwd, cex

color, line width, and character expansion for each point. lwd and col are recycled as necessary to cover all points. See par for more details.

Author

Tim Gerrodette tim.gerrodette@noaa.gov

Examples

Run this code
x <- runif(20, 0, 10)
y <- runif(20, 0, 200)
plot(x, y, type = "n")
sex.symbols(x, y, sex = 1:2, cex = 1.5, lwd = c(1.5, 4), col = c("blue", "red"))    

Run the code above in your browser using DataLab