(no subject)

External Email - Use Caution

Hello

I was trying to repeat example Visualize Evoked data, but no matter if I'm using sample data or my own I always get this error
File "C:\Anaconda3\envs\mne\lib\site-packages\matplotlib\figure.py", line 2276, in <genexpr>
    for ax in self.axes if ax.get_visible())

TypeError: get_tightbbox() got an unexpected keyword argument 'bbox_extra_artists'
as a result of this function:
mne.viz.plot_compare_evokeds(evoked_dict, picks=pick, colors=colors,
                             linestyles=linestyles, split_legend=True)

What's the reason? Some problems with my PC?
I get the same error trying another example code with sample data - Analysing continuous features with binning and regression in sensor space. But in this case, it was produced by

for cond in names:
    res[cond].beta.plot_joint(title=cond, ts_args=dict(time_unit='s'),
                              topomap_args=dict(time_unit='s'))

Looking forward for your replay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190219/6ec98ec4/attachment.html

External Email - Use Caution

hi,

please say what mne.sys_info() reports.

See:

https://martinos.org/mne/dev/generated/mne.sys_info.html

I suspect your version of matplotlib is too old or not properly installed.

Alex

External Email - Use Caution

Hello

Platform: Windows-10-10.0.16299-SP0
Python: 3.6.7 |Anaconda, Inc.| (default, Oct 28 2018, 19:44:12) [MSC v.1915 64 bit (AMD64)]
Executable: C:\Anaconda3\envs\mne\pythonw.exe
CPU: Intel64 Family 6 Model 78 Stepping 3, GenuineIntel: 4 cores
Memory: 3.9 GB

mne: 0.16.2
numpy: 1.15.3 {blas=mkl_rt, lapack=mkl_rt}
scipy: 1.1.0
matplotlib: 3.0.1 {backend=module://ipykernel.pylab.backend_inline}

sklearn: 0.20.0
nibabel: 2.3.1
mayavi: 4.6.2 {qt_api=pyqt5}
pycuda: Not found
skcuda: Not found
pandas: 0.23.4

External Email - Use Caution

Can you try updating `matplotlib`? It's likely an error in that library.

Eric

External Email - Use Caution

Hi,

I think that this error appears with matplotlib 3.0.1 which you?are currently using) (https://github.com/matplotlib/matplotlib/issues/12634 )
It has been fixed in 3.0.2

Try to upgrade matplotlib to 3.0.2 with the following command:

pip install --upgrade matplotlib

Best Regards,
Victor

External Email - Use Caution

Thank you, it's helped, but now I have another error with my data: vlines must be a list or tuple, not <class 'str'>

This is my code:
conditions = ['1', '2', '4']
evoked_dict = dict()
for condition in conditions:
    evoked_dict[condition] = mne.read_evokeds(fname, baseline=(None, 0), proj=True, condition=condition)
print(evoked_dict)

colors = dict(Left="Crimson", Right="CornFlowerBlue")

pick = evoked_dict['1'].ch_names.index('MEG0242')

mne.viz.plot_compare_evokeds(evoked_dict, picks=pick, colors=colors, vlines='auto', split_legend=True)

Seems problem with my data, because sample works. Is it something with epochs?

External Email - Use Caution

That is probably a bug, `vlines='auto'` should always work. We are probably
not dealing with it properly for your data. Can you open an issue on
GitHub? Also mention the `tmin` and `tmax` of your `evoked` instance, since
it could matter.

Eric

External Email - Use Caution

Thank you, I will.

Until this issue will be solved, is there any other way to get event-related response for 1 MEG channel?

External Email - Use Caution

evoked.copy().pick_channels(['MEG0242']).plot() should work.

Eric

External Email - Use Caution

I checked again, and seems `vlines='auto' doesn't work with data, where tmin = 0.0

External Email - Use Caution

please open an issue on github ?

there can you share a code snippet to replicate the problem?

https://github.com/mne-tools/mne-python/issues

A