Learn R Programming

equate (version 1.2-0)

plot.freqtab: Plotting of Frequency Distributions

Description

This function plots univariate and bivariate frequency tables of class freqtab

Usage

## S3 method for class 'freqtab':
plot(x, y, col1 = "gray27", col2 = "gray74",
	type = "h", pch=16, yoffset = 0.3, ...)

Arguments

x
univariate or bivariate score distribution of class freqtab.
y
univariate score distribution, either as an object of class freqtab or a vector of frequencies, to be added to the plot of univariate x (see details).
col1
color of lines used in plotting univarite x, and in plotting both variables in bivariate x.
col2
color of lines used in plotting y.
type
character vector describing the type of plot to be drawn when x is univariate, where type[1] is used for plotting x and type[2] for plotting y. The default "h" plots a vertical
pch
plotting point (see par) used in bivariate scatterplot.
yoffset
integer indicating amount of offset when plotting vertical lines (i.e., type[2] == "h") for y, expressed in terms of x scale points.
...
further arguments passed to or from other methods, such as graphical parameters besides col.

Value

  • The univariate option produces a single, simple, line plot of type="h". The bivariate option produces a scatterplot with a marginal barplot for each distribution.

Details

When x is bivariate, e.g., coming from one form of a nonequivalent groups equating design, y is ignored. Otherwise x and y are assumed to be on similar scales, where x determines the x-axis. Colors must be specified using col1 and col2.

See Also

plot.table, lines

Examples

Run this code
neat.xv <- freqtab(KBneat$x[, 1], KBneat$x[, 2],
	xscale = 0:36, vscale = 0:12)
plot(neat.xv)

neat.x <- freqtab(KBneat$x[, 1], xscale = 0:36)
neat.v <- freqtab(KBneat$x[, 2], vscale = 0:12)
plot(neat.x, neat.v, lwd = 2)
plot(neat.x, neat.v, lwd = 2, type = "l")

Run the code above in your browser using DataLab