spectrum.plot {UCS} | R Documentation |
Comparative plot of up to five word frequency spectra (see Baayen, 2001), either as a side-by-side barplot or as points and lines on a logarithmic scale.
spectrum.plot(spc, m.max=Inf, log=FALSE, y.min=100, y.max=0, xlab="m", ylab="V_m / E[V_m]", legend=NULL, pch=c(1, 3, 15, 2, 20), lwd=1, lty=c("solid", "dashed", "dotdash", "dotted", "twodash"), col=if (log) c("black") else c("black", "grey50", ...))
spc |
a list containing up to five frequency spectrum vectors.
Such spectrum vectors can be read in from a file in lexstats
format with read.spectrum or generated
by a ZM or fZM model with the EVm method. |
m.max |
number of frequency ranks to be shown in plot. If
unspecified, it is determined by the shortest spectrum vector in
spc . |
log |
if TRUE , display frequency spectra as points and
lines on a logarithmic scale. If FALSE , display spectra as
side-by-side barplot on a linear scale (default). The latter is
only useful when m.max is comparatively small. |
y.min, y.max |
range of y-axis. y.max is automatically
computed to fit the data in spc . y.min is only used
when log=TRUE and defaults to 100. |
legend |
a vector of character strings or expressions specifying
the labels to be shown in a legend box. If legend is
missing, no legend box will be displayed. |
xlab, ylab |
character strings giving labels for the x-axis and y-axis |
pch, lwd, lty |
vectors of plot symbols, line widths, and line
types (only used if log=TRUE . Values are recycled if
necessary. See the par manpage for possible ways of
specifying these attributes. |
col |
a vector of colours for the lines (log=TRUE ) or bars
(log=FALSE ) in the plot. Values are recycled if necessary.
Colours are specified as described in the par manpage. |
Baayen, R. Harald (2001). Word Frequency Distributions. Kluwer, Dordrecht.
read.spectrum
, zm
, fzm
, EVm