eo.setup {UCS}R Documentation

Initialise and Finalise an (e,o) Plot (eo)

Description

eo.setup initialises a new (e,o) plot window, which can then be drawn into with calls to eo.iso, eo.points and similar functions. The plot has to be finalised with eo.close before a new plot can be generated.

A detailed explanation of (e,o) plots and their interpretation can be found in Section 3.3 of Evert (2004).

Usage


eo.setup(xlim=eo.par("xlim"), ylim=eo.par("ylim"), ds=NULL,
         bw=eo.par("bw"), file=NULL,
         aspect=eo.par("aspect"), log.marks=eo.par("log.marks"),
         cex=eo.par("cex"), ...)

eo.close()

Arguments

xlim, ylim integer vectors of length 2, specifying ranges for the e-axis (xlim) and o-axis (ylim) in orders of magnitude (i.e., base 10 logarithms: -2 corresponds to .01, 0 corresponds to 1, and 3 corresponds to 1000). If xlim and ylim are not given and no default values have been set with eo.par, the ds parameter has to be specified. Note that (e,o) plots are always drawn in logarithmic scale.
ds A data set from which suitable ranges for the e-axis and o-axis are computed. The automatically determined values are overridden by explicit xlim and ylim parameters.
bw If TRUE, the (e,o) plot is drawn in B/W mode, otherwise in colour mode. The default value is set with eo.par.
file a character string giving the name of a PostScript file. If specified, the (e,o) plot is saved to file in EPS format rather than displayed on screen. Note that this file will only be written after eo.close has been called.
aspect If TRUE, an aspect ratio of 1:1 is enforced by extending the axis ranges as necessary (assuming that the plotting region is square). The default value is set with eo.par.
log.marks If TRUE, tick marks on the axes are labelled in logarithmic units, i.e. orders of magnitude. Otherwise, absolute numbers are used. The default value is set with eo.par. (Recall that (e,o) plots are always drawn in logarithmic scale.)
cex overall character expansion factor (for tick marks, axis labels and legends). The default value is set with eo.par.
... Any additional parameters are passed through to the plot function used to set up the plot region and axes.

Details

An (e,o) plot is typically created in four stages:

Default values for xlim, ylim, bw, aspect, log.marks and cex can be set with the eo.par function. See the eo.par help page for "factory settings" of these parameters, as well as default line and point styles in colour and B/W mode.

Note that (e,o) plots are always drawn in logarithmic scale and tick marks are shown for orders of magnitude (full powers of ten). The log.marks parameter only determines whether the labels on these tick marks show linear (.1, 1, 10, 100, ...) or logarithmic (-1, 0, 1, 2, ...) values.

References

Evert, Stefan (2004). The Statistics of Word Cooccurrences: Word Pairs and Collocations. PhD Thesis, IMS, University of Stuttgart.

See Also

eo.par, eo.points, eo.iso, eo.iso.diff, eo.mark, eo.legend

Examples


ucs.library("eo")

## load data set file, add jitter, and reduce to random 10% subset
ds <- add.jitter(read.ds.gz("dickens.ds.gz"))
select <- rbinom(nrow(ds), 1, .1) == 1 
ds <- ds[select,]

## 1) set up new (e,o) plot with suitable axis ranges
eo.setup(ds=ds)  # note that y axis is extend to enforce 1:1 aspect

## 2) add data set as point cloud and three iso-lines
eo.points(ds, style=5, jitter=TRUE)
eo.iso("Poisson.pv", 3, style=1)  # p-value = 1e-3
eo.iso("z.score", 3.09, style=2)  # corresponding one-sided z-score
eo.iso("t.score", 3.09, style=3)  # same as t-score with df=Inf

## 3) add legend boxes in top right (2) and bottom right (3) corner
eo.legend.points(2, "pair type", 5)
eo.legend.iso(3, c("Poisson", "z-score", "t-score"), 1:3)

## 4) finalise the (e,o) plot
eo.close()


[Package UCS version 0.5 Index]