[Mne_analysis] problem about plotting raw date
Alexandre Gramfort
alexandre.gramfort at inria.fr
Sun Feb 7 11:33:01 EST 2021
External Email - Use Caution
hi,
can you ask your question at https://secure-web.cisco.com/1tGdhYrI-CAeNcXk2uF2Bs6H1fG_ErhhYV2b54IwY83WDMzoS-4JIzA2mBdjXOiYsXAkggAg0gX2Lq-eTWj8EN3-ZjE3KYAHMmNrvmoCoKG_m1cs9DiY8kiiIfl09p6hajoP-fk2GQf1Cs-C1rxK9LuPcpF-06jpyUq-l1sax3m_XEoyv67LKjjf-Wr6AGeyjdIQ4n2dxCUumtY4p3ujVjkJzNHx4Czw7e1g5wyDqUJ8VVNEkGIT9qMVgcXo5iWsD5QWEY4IFEmEDTgyk6uL1Og/https%3A%2F%2Fmne.discourse.group%2F
can share the file and a full script to replicate the issue?
thanks
Alex
On Sun, Feb 7, 2021 at 4:47 PM 谭 淦升 <aegean0045 at outlook.com> wrote:
> External Email - Use Caution
>
> Dear MNE community,
>
>
>
> I would like to plot de rawEEGLAB data (<RawEEGLAB | iVC_s01.set, n_channels x n_times : 32 x 105219 (210.4 sec), ~25.8 MB, data loaded> using raw_eeg.plot(). Then I get this: *ValueError*: The number of FixedLocator locations (20), usually from a call to set_ticks, does not match the number of ticklabels (1).
>
>
>
> The complete error message is:
>
> *---> 72* raw_eeg*.*plot*()*
>
>
>
> *~\Anaconda3\envs\p3.7\lib\site-packages\mne\io\base.py* in plot*(self, events, duration, start, n_channels, bgcolor, color, bad_color, event_color, scalings, remove_dc, order, show_options, title, show, block, highpass, lowpass, filtorder, clipping, show_first_samp, proj, group_by, butterfly, decim, noise_cov, event_id, show_scrollbars, verbose)*
>
> 1566 group_by*,* butterfly*,* decim*,* noise_cov*=*noise_cov*,*
>
> 1567 event_id*=*event_id*,* show_scrollbars*=*show_scrollbars*,*
>
> *-> 1568** verbose=verbose)*
>
> 1569
>
> 1570 *@*verbose
>
>
>
> *<C:\Users\aegea\Anaconda3\envs\p3.7\lib\site-packages\mne\externals\decorator.py:decorator-gen-132>* in plot_raw*(raw, events, duration, start, n_channels, bgcolor, color, bad_color, event_color, scalings, remove_dc, order, show_options, title, show, block, highpass, lowpass, filtorder, clipping, show_first_samp, proj, group_by, butterfly, decim, noise_cov, event_id, show_scrollbars, verbose)*
>
>
>
> *~\Anaconda3\envs\p3.7\lib\site-packages\mne\utils\_logging.py* in wrapper*(*args, **kwargs)*
>
> 88 *with* use_log_level*(*verbose_level*):*
>
> 89 *return* function*(**args*,* ****kwargs*)*
>
> *---> 90* *return* function*(**args*,* ****kwargs*)*
>
> 91 return FunctionMaker.create(
>
> 92 function*,* *'return decfunc(%(signature)s)'**,*
>
>
>
> *~\Anaconda3\envs\p3.7\lib\site-packages\mne\viz\raw.py* in plot_raw*(raw, events, duration, start, n_channels, bgcolor, color, bad_color, event_color, scalings, remove_dc, order, show_options, title, show, block, highpass, lowpass, filtorder, clipping, show_first_samp, proj, group_by, butterfly, decim, noise_cov, event_id, show_scrollbars, verbose)*
>
> 409
>
> 410 _prepare_mne_browse_raw(params, title, bgcolor, color, bad_color, inds,
>
> *--> 411** n_channels)*
>
> 412
>
> 413 *# plot event_line first so it's in the back*
>
>
>
> *~\Anaconda3\envs\p3.7\lib\site-packages\mne\viz\raw.py* in _prepare_mne_browse_raw*(params, title, bgcolor, color, bad_color, inds, n_channels)*
>
> 717 params['lines'] = [ax.plot([np.nan], antialiased=True, linewidth=0.5)[0]
>
> 718 for _ in range(n_ch)]
>
> *--> 719* ax*.*set_yticklabels*([**'X'* *** max*([*len*(*ch*)* *for* ch *in* info*[**'ch_names'**]])])*
>
> 720 params*[**'fig_annotation'**]* *=* *None*
>
> 721 params*[**'fig_help'**]* *=* *None*
>
>
>
> *~\Anaconda3\envs\p3.7\lib\site-packages\matplotlib\axes\_base.py* in wrapper*(self, *args, **kwargs)*
>
> 61
>
> 62 *def* wrapper*(*self*,* ***args*,* ****kwargs*):*
>
> *---> 63* *return* get_method*(*self*)(**args*,* ****kwargs*)*
>
> 64
>
> 65 wrapper*.*__module__ *=* owner*.*__module__
>
>
>
> *~\Anaconda3\envs\p3.7\lib\site-packages\matplotlib\cbook\deprecation.py* in wrapper*(*args, **kwargs)*
>
> 449 *"parameter will become keyword-only %(removal)s."**,*
>
> 450 name=name, obj_type=f"parameter of {func.__name__}()")
>
> *--> 451* *return* func*(**args*,* ****kwargs*)*
>
> 452
>
> 453 *return* wrapper
>
>
>
> *~\Anaconda3\envs\p3.7\lib\site-packages\matplotlib\axis.py* in _set_ticklabels*(self, labels, fontdict, minor, **kwargs)*
>
> 1791 *if* fontdict *is* *not* *None**:*
>
> 1792 kwargs*.*update*(*fontdict*)*
>
> *-> 1793* *return* self*.*set_ticklabels*(*labels*,* minor*=*minor*,* ****kwargs*)*
>
> 1794
>
> 1795 *@*cbook*.*_make_keyword_only*(**"3.2"**,* *"minor"**)*
>
>
>
> *~\Anaconda3\envs\p3.7\lib\site-packages\matplotlib\axis.py* in set_ticklabels*(self, ticklabels, minor, **kwargs)*
>
> 1713 *if* len*(*locator*.*locs*)* *!=* len*(*ticklabels*)* *and* len*(*ticklabels*)* *!=* *0**:*
>
> 1714 raise ValueError(
>
> *-> 1715* *"The number of FixedLocator locations"*
>
> 1716 *f" ({len(locator.locs)}), usually from a call to"*
>
> 1717 *" set_ticks, does not match"*
>
>
>
> *ValueError*: The number of FixedLocator locations (20), usually from a call to set_ticks, does not match the number of ticklabels (1).
>
>
>
> I am not sure where is the problem. Plotting raw data in another computer
> works just fine. Could you help me with this?
>
>
>
> Thanks,
>
> Gansheng
>
>
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://secure-web.cisco.com/1hm32M9d1uLXCHRok9LZm6d_3XNTH0SJR1kRgsFA-u6RE_aHZeeEzuSoSn4NORvXENdIWMAarxOQh7hKrCdrWWK5y3GLUk7oSkK1z9iz9jl12W_vNETqnjMohtrcKTbKcUsUYdhA2yKkbHoZX9TPTAkWAzcxZ7HK41NsaqkWWHJgB7ov6YP-K1Y5CbC4zfk36XNW-AIVe7Txk7xX68R6kF-9OIHv6GOMG6zA847i0ruyV6bgRVbfL6VmU7i0KY8vI-B5jfTvnESo7hhIZH2Vz1g/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20210207/87e06183/attachment-0001.html
More information about the Mne_analysis
mailing list