erp.xaxis: Draw an erp x axis

Description Usage Arguments Value Note Author(s) See Also Examples

Description

This function plots an x axis for an erp waveform. Numbers and tick positions are determined according to three parameters: length.erp, startmsec and endmsec (the function calls msectopoints).

Usage

1
2
3
4
5
6
erp.xaxis(length.erp = NULL, startmsec=NULL, endmsec = NULL, 
x.tick = NULL, x.labels = x.tick, x.las=0,
draw.x.ticks = TRUE, x.pos = NA, x.outer = FALSE, x.font = NA, 
x.lty = "solid", x.lwd = 1,  x.lwd.ticks = 1, x.col = NULL,
x.col.ticks = NULL, x.hadj = NA,  x.padj = NA, x.tcl = -0.5,
x.tick.both= FALSE, x.cex = 1)

Arguments

length.erp

the length of the ERP vector the axis refers to.

startmsec

start time (in ms) of the ERP vector.

endmsec

end time (in ms) of the ERP vector.

x.tick

the position (in ms) of x ticks.

x.labels

the labels (usually a vector of numbers) to be plotted on the x axis.

x.las

the style of x axis labels.

draw.x.ticks

a logical value specifying whether x tickmarks and an axis line should be drawn.

x.pos

the position of x axis, in terms of y axis coordinates. Default is NA and the axis is drawn at the bottom of the plot.

x.outer

a logical value indicating whether the x axis should be drawn in the outer plot margin, rather than the standard plot margin.

x.font

font for text of x labels. Default is par("font").

x.lty

line type of both the x axis line and the x tick marks.

x.lwd

line width of the x axis line.

x.lwd.ticks

line width of the x tick marks.

x.col

colors of the x axis line and the x tick marks.

x.col.ticks

the color of the x tick marks (if specified, overrides x.col)

x.hadj

adjustment (see par("adj")) for all x labels parallel ("horizontal") to the reading direction. If this is not a finite value, the default is used (centering for strings parallel to the axis, alignment of the end nearest the axis otherwise).

x.padj

adjustment for each x tick label purpendicular to the reading direction. For labels parallel to the axes, padj = 0 means right or top alignment, and padj = 1 means left or bottom alignment. This can be a vector given a value for each string, and will be recycled as necessary.

x.tcl

The length of tick marks as a fraction of the height of a line of text. The default value is -0.5.

x.tick.both

Logical. Should the tick marks be drawn both above and below the x axis?

x.cex

The magnification to be used for the x labels.

Value

An erp x axis is drawn on an existing plot.

Note

This function is called internally by the erp function.

Author(s)

Giorgio Arcara

See Also

erp, erp.yaxis

Examples

1
2
3
4
5
plot(1, ylim=c(-5,5), xlim=c(0,200), frame.plot=FALSE, 
type="n", axes=FALSE, xlab="", ylab="")

erp.xaxis(200, startmsec=-200, endmsec=1500, 
x.pos=0, x.lwd=2)

erpR documentation built on June 7, 2019, 3 a.m.