zipfR (version 0.6-66)

plot.tfl: Plot Type-Frequency List / Zipf Ranking (zipfR)

Description

Zipf ranking plot of a type-frequency list, or comparison of several Zipf rankings, on linear or logarithmic scale.

Usage

# S3 method for tfl
plot(x, y, ...,
       min.rank=1, max.rank=NA, log="", 
       type=c("p","l","b","c","o","h","s"),
       bw=zipfR.par("bw"), cex=1,
       xlim=NULL, ylim=NULL,
       xlab="rank", ylab="frequency", legend=NULL,
       main="Type-Frequency List (Zipf ranking)",
       pch=NULL, lty=NULL, lwd=NULL, col=NULL)

Arguments

x, y, ...

one or more objects of class tfl, containing the type frequency list(s) to be plotted

min.rank, max.rank

range of Zipf ranks to be plotted for each type-frequency list. By default, all ranks are shown.

log

a character string specifying the axis or axes for which logarithmic scale is to be used ("x", "y", or "xy"), similar to the log argument of plot.default.

bw

if TRUE, draw plot in B/W style (default is the global zipfR.par setting)

type

what type of plot should be drawn. See plot.default for details.

cex

scaling factor for plot symbols (types "p", "b" and "o"). This scaling factor is not applied to other text elements in the plot; use par for this purpose.

xlim, ylim

visible range on x- and y-axis. The default values are automatically determined to fit the selected data in the plot.

xlab, ylab

labels for the x-axis and y-axis.

legend

optional vector of character strings or expressions, specifying labels for a legend box, which will be drawn in the upper right-hand corner of the screen. If legend is given, its length must correspond to the number of frequency spectra in the plot.

main

a character string or expression specifying a main title for the plot

pch, lty, lwd, col

style vectors that can be used to override the global styles defined by zipfR.par. If these vectors are specified, they must contain at least as many elements as the number of type-frequency lists shown in the plot: the values are not automatically recycled.

Details

The type-frequency lists are shown as Zipf plots, i.e. scatterplots of the Zipf-ranked frequencies on a linear or logarithmic scale. The same plotting styles are available as in plot.default.

Line and point styles are defined globally through zipfR.par, but can be overridden with the optional parameters pch, lty, lwd and col. In most cases, it is more advisable to change the global settings temporarily for a sequence of plots, though.

The bw parameter is used to switch between B/W and colour modes. It can also be set globally with zipfR.par.

See Also

tfl, vec2tfl, rlnre, spc2tfl, plot.spc, plot.vgc, zipfR.par, zipfR.plotutils

Examples

Run this code
# NOT RUN {
 
  ## TODO ##

# }

Run the code above in your browser using DataCamp Workspace