mne-tools/mne-python — pull request #376 by dengemann (2013-01-13 19:35:46+00:00)
Title: FIX: fixing API / error handling in plot_evoked

- now the catcher does exactly what I initially wanted it to do:
check whether all parameters are present for the data types foound in
evoked.

Addresses #375 #337

In the TFxMNE example now the following wrong arguments would generate an informative error message:

```Python
ylim = dict(eeg=[-10, 10], grad=[-200, 250], mag=[-600, 600])
plot_evoked(evoked, ylim=ylim, proj=True,
titles=dict(mag='Evoked Response (grad)'))

ValueError: For some of the data types in evoked parameters are missing:
No 'titles' parameter for channels of type grad.

ylim = dict(eeg=[-10, 10], misc=[-200, 250], mag=[-600, 600])
plot_evoked(evoked, ylim=ylim, proj=True,
titles=dict(mag='Evoked Response (grad)'))

ValueError: For some of the data types in evoked parameters are missing:
No 'titles' parameter for channels of type grad.
No 'ylim' parameter for channels of type grad.
```