mne-tools/mne-python — pull request #361 by adykstra (2013-01-10 13:58:55+00:00)
Title: WIP: FIX: ENH: enhancements to topo plotting

Hi everyone,

I've been working on the topo_plot section of viz.py (the viz module? - not up on Python jargon) with the goal of improving (I think) the display. The version I'm running now scales all the plots for a given channel type to the same max and min values, gets rid of the border around each subplot, adds white lines for time=0 and amplitude=0, and adds condition labels in the same colors as the waveforms. Also, I edited the picker function to only bring up a single new figure (for me, it was bringing up as many figures as were ojbects in the subplot). It's a bit hackish, and probably there is a better way to accomplish what I did, but it does handle all known MEG and EEG layouts, and it brings the figure close to what the C-code does. The Vectorview (same layout as Triux, yes?) is the only system with multiple channel types as far as I know. See an example of the figure the code produces below.

It's not a fix, technically, except for the picker functionality. However, because the subplots in the example topo plots are all automatically scaled to their own respective min/max values, it's harder to see where the evoked response truly exceeds baseline. BTW, what I've hacked looks nothing like the scalings argument for the viz.plot_evoked (didn't notice those before), but I'm not sure that one needs that parameter. What I've done sets the vertical axes limits which, again, are easily defined by the data itself anyway, across all channels of a given type, to the max abs value, across all channels and time points of said type.

The other, ahem, more elegant option would be to add a scaling parameter as in plot_evoked, but that introduces more work to the user (having to define the scale they want), and I think it's fair to assume that most users (all?) will want to see their evoked responses in their max dynamic range (across channels rather than within them).

New plot:
![new_topo_plot](https://f.cloud.github.com/assets/2804716/56816/c6ebdb32-5b2d-11e2-8451-61436fa29d93.png)