Plotting ERP curves

Shortly, the dataset contains 40 ERP curves in its 251 first columns. The last two colums, named Subject and Instruction, gives for each curve the corresponding subject and its membership to an experimental group. The following command produces a plot of the ERP curves:

erpcolors = ifelse(erpcz$Instruction=="TBF","orange","blue")
erpplot(dta=erpcz[,1:251],frames=seq(0,1001,4),
   xlab="Time (ms)",ylab="ERP",lwd=1.5,lty=1,
   main="ERP at electrode CZ",col=erpcolors) 
legend("bottomleft",lty=c(1,1),lwd=1.5,col=c("orange","blue"),
   legend=c("TBF","TBR"))

A plot is generated with the following content:

erpplotcz

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s