Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dots

Create a quick dotchart (histogram)


Description

Create a quick dotchart of 1 or 2 datasets. These dotcharts are a poor man's histogram, not the trellis dotplot.

Usage

dots(x,...)
dots2(x, y, colx = "green", coly = "blue", lab1 =
deparse(substitute(x)), lab2 = deparse(substitute(y)),...)

Arguments

x

Vector, data to be plotted (should be rounded).

y

Vector, second dataset to be plotted.

colx

Color of points for x.

coly

Color of points for y.

lab1

Label for x.

lab2

Label for y.

...

Additional arguments passed to plotting functions.

Details

These functions create basic dotcharts that are quick "back of the envelope" approximations to histograms. Mainly intended for demonstration.

Value

No meaninful value. These functions are run for the side effect of creating a plot.

Author(s)

Greg Snow 538280@gmail.com

See Also

dotplot in the lattice package, hist

Examples

dots( round( rnorm(50, 10,3) ) )
dots2( round( rnorm(20, 10,3) ), round(rnorm(20,12,2)) )

TeachingDemos

Demonstrations for Teaching and Learning

v2.12
Artistic-2.0
Authors
Greg Snow
Initial release
2020-04-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.