xyplot: Scatter Plots

View source: R/xyplot.R

xyplotR Documentation

Scatter Plots

Description

Create a scatter plot.

Usage

xyplot(x, data, ...)

Arguments

x

formula. An expression of the form y ~ x | z where x is the variable we want on the x-axis, y is the variable we want on the y-axis and z is an optional variable we would like to use for faceting.

data

data frame. The data where the variables can be found.

groups

factor. An additional variable to use for coloring the individual points in the plot.

Note

For additional options for creating bargraphs, look at the help file found in the lattice package or run help(xyplot, package="lattice") in the console.

Examples

data(cdc)
xyplot(weight~height, data = cdc)
xyplot(weight ~ height | gender, data = cdc)
xyplot(weight ~ height, data = cdc, groups = gender)


mobilizingcs/mobilizr documentation built on May 5, 2024, 1:01 a.m.