Customizing common M/EEG plots part 2: the time-frequency representation (TFR)

This is the second installment (out of probably three) of blog posts based on the data visualization workshop I gave for the Language in Interaction consortium. (Part 1 was on plotting ERP/Fs, or 1D data over time with uncertainty.). This time I’ll go over some things you can do to improve the appearance of time-frequency representations (TFRs), often of oscillatory power. The customizations I’m describing here will be a bit more concerned with aesthetics and personal preference than with actually “showing the data” (like in part 1), but I still think/hope this will be useful to some.

Continue reading “Customizing common M/EEG plots part 2: the time-frequency representation (TFR)”

Customizing common M/EEG plots part 1: the event-related potential/field (ERP/F)

I recently (well, 25 June 2018) taught a data visualization workshop as part of the Language in Interaction consortium at the Donders Institute in Nijmegen. As part of my workshop, I thought I’d go over some fairly simple ways in which people could customize (or dare I say: improve?) some commonly used plots when analyzing MEG or EEG data. Since it would be a waste to have all that preparation for the workshop go to waste on just the small audience that was there that day, I’ll post my code with some explanations here on my blog as well. Today: how to better visualize plots like the event-related potential or field. Or, more generally: how to visualize 1D data over time.

Continue reading “Customizing common M/EEG plots part 1: the event-related potential/field (ERP/F)”

Concatenate subfields from Matlab structure into one data array

Don’t you just hate when you have an MxN struct array in Matlab, where each element contains some PxK data field, and you just really want to have all that data in a single PxKxMxN array? OK, maybe this doesn’t happen to you very frequently, but it has happened to me. In fact, it has happened so often that I decided to write a (very simple) general solution to this problem.

Continue reading “Concatenate subfields from Matlab structure into one data array”