Description Usage Arguments Value Note Author(s) Examples
This function draws a topoplot palette as a rectangle with colored areas indicating the palette shades.
1 2 3 4 |
cols |
a vector of colors to draw the palette. This vector may be the output of |
pos |
the position of the palette as a proportion of the plot region. Default ( |
p.width |
palette width as a proportion of the plot region. |
p.height |
palette height as a proportion of the plot region. |
horizontal |
logical. Should the color shades be plotted horizontally? (default is vertical) |
rev |
logical. Should the palette shades order be reversed? |
palette.lwd |
line width of the palette rectangle. |
palette.bord |
color of the palette border. |
palette.lim |
limits of the palette. They will be plotted as text if |
draw.labels |
logical. Should labels be drawn? |
labels |
logical. Should labels indicating |
lab.dist |
a number indicating the distance of the labels from the palette rectangle. Positive numbers move the labels from the palette rectangle, whereas negative numbers move the labels towards the rectangle. |
lab.cex |
magnification factor for the labels. |
lab.font |
font type for the labels (see |
lab.family |
font family for the labels (see |
measure |
the label indicating the labels to be displayed with the palette. Default is |
detailed.labels |
a list containing two labels, for the upper and lower limits of the palette (e.g. list(10 "%", "-10%"). If specified this value overrides |
the function draws a palette on an existing plot.
The two parameters cols
and zlim
may be supplied with values that are returned from topoplot
.
Giorgio Arcara
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 27 28 |
if(require(akima)) {
data(erplistExample)
word=grandaverage("Exp1_word_subj", 1:20, erplist=erplistExample)
# check if some electrodes are not present in the list
# and create an object with these electrode names.
notfound=topoplot(word, return.notfound=TRUE)
#define a layout for
mat=matrix(c(1,2), 1, 2, byrow=TRUE)
layout(mat, widths=c(0.8, 0.2))
#make a topoplot excluding not found electrode
par(pty="s")
topo.data=topoplot(word, startmsec=-200, endmsec=1500, win.ini=400,
win.end=600, exclude=notfound)
#draw the palette on a new empty plot.
par(pty="m", mar=c(0,0,0,0))
plot.new()
topoplot.palette(cols=topo.data$palette,
palette.lim=topo.data$zlim, p.height=0.6)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.