# descriptives of MS characteristics, and amplitude distribution plot (Figure 3) load("./Posner2006_2.rda") ix <- d.all$mt < d.all$tTarEin - d.all$tCueEin meanampltab <- tapply(d.all$sacAmp, ix, mean, na.rm=T) meanMsAmplMinutes <- meanampltab["TRUE"] * 60 tapply(d.all$sacAmp, ix, hist, 100) summary(d.all$sacAmp[ix])*60 tapply(d$sacAmp[d$sacAmp<1], d$TYP, mean) # microsaccades are generally small par(mfrow=c(3,1)) tapply(d$sacAmp[d$sacAmp<1], d$TYP, hist, 100) # but the first one is a bit larger and the last one a bit smaller # ============== # = # Figure 3 = # ============== # densities are smoothed with a Gaussian kernel quartz() clrs <- list("black", gray(.5), gray(.3)) lwds <- c(2,2,2) ltys <- c(1,1,1) par(cex.lab=1.3, font.lab=2, mar=c(5, 4, 2, 2) + 0.1) plot(density(d$sacAmp[d$sacAmp<1 & d$TYP=="last MS"] * 60), type="n", main="", xlab="microsaccade amplitude [arcmin]", ylab="density") lines(densSingle <- density(d$sacAmp[d$sacAmp<1 & d$TYP=="single MS"] * 60), col=clrs[[1]], lty=ltys[1], lwd=lwds[1]) lines(densFirst <- density(d$sacAmp[d$sacAmp<1 & d$TYP=="first MS"] * 60), col=clrs[[2]], lty=ltys[2], lwd=lwds[2]) lines(densLast <- density(d$sacAmp[d$sacAmp<1 & d$TYP=="last MS"] * 60), col=clrs[[3]], lty=ltys[3], lwd=lwds[3]) legend("topright", c("single microsaccade", "first of several microsaccades", "last of several microsaccades"), col=unlist(clrs), lwd=lwds, lty=ltys, box.lwd=0, bg="white", cex=1, inset=.03) # ================ # = end Figure 3 = # ================ # separate for each response modality saccix <- d$EXP=="saccadic RT" manix <- d$EXP=="manual RT" quartz() par(mfrow=c(2,1), cex.lab=1.3, font.lab=2) par(mar=c(2, 4, 2, 2) + 0.1) plot(density(d$sacAmp[d$sacAmp<1 & d$TYP=="last MS"] * 60), type="n", ylab="density", main="saccadic responses") lines(density(d$sacAmp[d$sacAmp<1 & saccix & d$TYP=="single MS"] * 60), col=clrs[[1]], lty=ltys[1], lwd=lwds[1]) lines(density(d$sacAmp[d$sacAmp<1 & saccix & d$TYP=="first MS"] * 60), col=clrs[[2]], lty=ltys[2], lwd=lwds[2]) lines(density(d$sacAmp[d$sacAmp<1 & saccix & d$TYP=="last MS"] * 60), col=clrs[[3]], lty=ltys[3], lwd=lwds[3]) legend("topright", c("single microsaccade", "first of several microsaccades", "last of several microsaccades"), col=unlist(clrs), lwd=lwds, lty=ltys, box.lwd=0, bg="white", cex=1, inset=.03) par(mar=c(5, 4, 2, 2) + 0.1) plot(density(d$sacAmp[d$sacAmp<1 & d$TYP=="last MS"] * 60), type="n", xlab="microsaccade amplitude [arcmin]", ylab="density", main="manual responses") lines(density(d$sacAmp[d$sacAmp<1 & manix & d$TYP=="single MS"] * 60), col=clrs[[1]], lty=ltys[1], lwd=lwds[1]) lines(density(d$sacAmp[d$sacAmp<1 & manix & d$TYP=="first MS"] * 60), col=clrs[[2]], lty=ltys[2], lwd=lwds[2]) lines(density(d$sacAmp[d$sacAmp<1 & manix & d$TYP=="last MS"] * 60), col=clrs[[3]], lty=ltys[3], lwd=lwds[3])