EOG Artifact markers

Hello,

I am using the EOG artifact example
script<http://martinos.org/mne/auto_examples/preprocessing/plot_find_eog_artifacts.html>
but
having a little trouble with the output. First, am I right in assuming that
the "mne.artifacts.find_eog_events(raw, event_id)" section adds markers to
the input fif file? If not, what is the best way to save them? Second, I've
modified only the part of the script that specifies the input file, yet the
script finishes with errors:

Traceback (most recent call last):
  File "plot_find_eog_artifacts.py", line 39, in <module>
    pl.plot(1e3 * epochs.times, np.squeeze(data).T)
  File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 2467, in
plot
    ret = ax.plot(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 3893, in plot
    for line in self._get_lines(*args, **kwargs):
  File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 322, in
_grab_next_args
    for seg in self._plot_args(remaining, kwargs):
  File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 300, in
_plot_args
    x, y = self._xy_from_xy(x, y)
  File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 242, in
_xy_from_xy
    raise ValueError("x and y can be no greater than 2-D")
ValueError: x and y can be

The actual locating of the EOG artifacts seems to process okay (it finds 28
artifacts in this case and the output to screen looks like that in the
example on the website), instead it's just the plotting with matplotlib at
the end that fails. Any ideas why?

About the section of the script I modified. I didn't do too much, just
changed anything that specified the input file. I changed from this:

import numpy as np
import pylab as pl
import mne
from mne import fiff
from mne.datasets import sample
data_path = sample.data_path('..')

Hi Vincent,

You can save the events using mne.write_events and later load them again
using mne.read_events

The error your are getting is strange, I can't see anything wrong, as
all you changed is the file name. What matplotlib (pylab) version are
you using?

Best,

Martin

Hi Martin,

Thank you for the help. mne.write_events is just what I was looking for. As
for the second part of my question, I am running matplotlib 1.1.1. Should I
upgrade to the development version?

::vincent

hi Vincent,

Thank you for the help. mne.write_events is just what I was looking for. As
for the second part of my question, I am running matplotlib 1.1.1. Should I
upgrade to the development version?

do you have a lot of failures of plotting when running all the examples?

I have matplotlib 1.1.0

can you run the test suite? to do this just run "make test" or
"nosetests mne" in the mne-python folder.
Be careful to have the mne-sample-data folder present in the
mne-python/examples folder.

Alex