rasterplot: Raster plot of results from 'mass.t.test'.

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

Description

This function plot the results of mass.t.test in the form of raster.

Usage

1
2
rasterplot(res, startmsec=NULL, endmsec=NULL, palette.col="jet", lower.thresh=NULL, 
upper.thresh=NULL, zlim="default", cex.yaxis=0.7, cex.xaxis=1, ...)

Arguments

res

The results from a call to mass.t.test. It could be any of the matrices returned by mass.t.results

startmsec

the start time (in ms) of the ERP vector.

endmsec

the end time (in ms) of the ERP vector.

palette.col

The color scheme to be used in the plot. Two built-in palette are "jet" or "heat". Otherwise, you can specify any palette with colorRampPalette.

lower.thresh

set a lower threshold to the results to be displayed. Values below this threshold will not be plotted.

upper.thresh

set a upper threshold to the results to be displayed. Values below this threshold will not be plotted.

zlim

the limits of z axis (i.e. colors in the raster plot). If "default", then the limits are automatically computed.

cex.yaxis

magnification factor for the y axis.

cex.xaxis

magnification factor for the x axis.

...

Further arguments to be passed to the call to plot.

Details

This function plot the results of mass.t.test results

Value

A raster plot. It also return a list with mypalette (a function to create the palette used in the plot) and zlim, the actual limits used in the plot.

Note

If the function returns this error Error in plot.new() : figure margins too large , you may want to increase the size of your graphic device (e.g. quartz(height=10, width=10)), before calling rasterplot

Author(s)

Giorgio Arcara

See Also

mass.t.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Not run: 
data(erplistExample)

res = mass.t.test("Exp1_word_subj", "Exp1_nonword_subj", 1:20, 1:20, startmsec=-200, endmsec=1500, 
erplist1=erplistExample, erplist2=erplistExample, paired=T)

quartz(width=10, height=5)
par(mfrow=c(1,2))
rasterplot(res$t.mat, startmsec=-200, endmsec=1500, main = "all t-scores", cex.yaxis=0.7)
rasterplot(res$sig, startmsec=-200, endmsec=1500, main = "significance", cex.yaxis=0.7)

#rasterplot

layout(mat, widths=c(0.8, 0.2))

#make a rasterplot with palette using topoplot.palette.
par(pty="s")
rast = rasterplot(res$t.mat, startmsec=-200, endmsec=1500, main = "all t-scores", cex.yaxis=0.7)
#draw the palette on a new empty plot.
par(pty="m", mar=c(0,0,0,0))
plot.new()
topoplot.palette(cols=rast$palette, palette.lim=c(-4,4), p.height=0.6) 



## End(Not run)

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