Yes,
NOTE: pick_types() is a legacy function. New code should use inst.pick(...).
Removing projector <Projection | Average EEG reference, active : True, n_channels : 60>
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[18], line 2
1 evoked_diff = mne.combine_evoked([aud_evoked, vis_evoked], weights=[1, -1])
----> 2 evoked_diff.pick_types(meg="mag").plot_topo(color="r", legend=False)
File ~/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/mne/evoked.py:565, in Evoked.plot_topo(self, layout, layout_scale, color, border, ylim, scalings, title, proj, vline, fig_background, merge_grads, legend, axes, background_color, noise_cov, exclude, show)
539 @copy_function_doc_to_method_doc(plot_evoked_topo)
540 def plot_topo(
541 self,
(...)
558 show=True,
559 ):
560 """
561 Notes
562 -----
563 .. versionadded:: 0.10.0
564 """
--> 565 return plot_evoked_topo(
566 self,
567 layout=layout,
568 layout_scale=layout_scale,
569 color=color,
570 border=border,
571 ylim=ylim,
572 scalings=scalings,
573 title=title,
574 proj=proj,
575 vline=vline,
576 fig_background=fig_background,
577 merge_grads=merge_grads,
578 legend=legend,
579 axes=axes,
580 background_color=background_color,
581 noise_cov=noise_cov,
582 exclude=exclude,
583 show=show,
584 )
File ~/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/mne/viz/evoked.py:1288, in plot_evoked_topo(evoked, layout, layout_scale, color, border, ylim, scalings, title, proj, vline, fig_background, merge_grads, legend, axes, background_color, noise_cov, exclude, show)
1285 raise ValueError("color must be of type tuple, list, str, or None.")
1286 color = cycle([color])
-> 1288 return _plot_evoked_topo(
1289 evoked=evoked,
1290 layout=layout,
1291 layout_scale=layout_scale,
1292 color=color,
1293 border=border,
1294 ylim=ylim,
1295 scalings=scalings,
1296 title=title,
1297 proj=proj,
1298 vline=vline,
1299 fig_facecolor=fig_facecolor,
1300 fig_background=fig_background,
1301 axis_facecolor=axis_facecolor,
1302 font_color=font_color,
1303 merge_channels=merge_grads,
1304 legend=legend,
1305 axes=axes,
1306 exclude=exclude,
1307 show=show,
1308 noise_cov=noise_cov,
1309 )
File ~/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/mne/viz/topo.py:1079, in _plot_evoked_topo(evoked, layout, layout_scale, color, border, ylim, scalings, title, proj, vline, hline, fig_facecolor, fig_background, axis_facecolor, font_color, merge_channels, legend, axes, exclude, show, noise_cov)
1077 time_min = min([t[0] for t in times])
1078 time_max = max([t[-1] for t in times])
-> 1079 fig = _plot_topo(
1080 info=info,
1081 times=[time_min, time_max],
1082 show_func=show_func,
1083 click_func=click_func,
1084 layout=layout,
1085 colorbar=False,
1086 ylim=ylim_,
1087 cmap=None,
1088 layout_scale=layout_scale,
1089 border=border,
1090 fig_facecolor=fig_facecolor,
1091 font_color=font_color,
1092 axis_facecolor=axis_facecolor,
1093 title=title,
1094 x_label="Time (s)",
1095 y_label=y_label,
1096 unified=True,
1097 axes=axes,
1098 )
1100 add_background_image(fig, fig_background)
1102 if legend is not False:
File ~/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/mne/viz/topo.py:334, in _plot_topo(info, times, show_func, click_func, layout, vmin, vmax, ylim, colorbar, border, axis_facecolor, fig_facecolor, cmap, layout_scale, title, x_label, y_label, font_color, unified, img, axes)
331 else:
332 ylim_ = ylim
--> 334 show_func(ax, ch_idx, tmin=tmin, tmax=tmax, vmin=vmin, vmax=vmax, ylim=ylim_)
336 if title is not None:
337 plt.figtext(0.03, 0.95, title, color=font_color, fontsize=15, va="top")
File ~/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/mne/viz/topo.py:669, in _plot_timeseries_unified(bn, ch_idx, tmin, tmax, vmin, vmax, ylim, data, color, times, vline, x_label, y_label, colorbar, hline, hvline_color)
666 # XXX These calls could probably be made faster by using collections
667 for data_, color_, times_ in zip(data, color, times):
668 data_lines.append(
--> 669 ax.plot(
670 bn.x_t + bn.x_s * times_,
671 bn.y_t + bn.y_s * data_[ch_idx],
672 linewidth=0.5,
673 color=color_,
674 clip_on=True,
675 clip_box=tuple(pos),
676 )[0]
677 )
678 if vline:
679 vline = np.array(vline) * bn.x_s + bn.x_t
File ~/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/matplotlib/axes/_axes.py:1721, in Axes.plot(self, scalex, scaley, data, *args, **kwargs)
1478 """
1479 Plot y versus x as lines and/or markers.
1480
(...)
1718 (``'green'``) or hex strings (``'#008000'``).
1719 """
1720 kwargs = cbook.normalize_kwargs(kwargs, mlines.Line2D)
-> 1721 lines = [*self._get_lines(self, *args, data=data, **kwargs)]
1722 for line in lines:
1723 self.add_line(line)
File ~/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/matplotlib/axes/_base.py:303, in _process_plot_var_args.__call__(self, axes, data, *args, **kwargs)
301 this += args[0],
302 args = args[1:]
--> 303 yield from self._plot_args(
304 axes, this, kwargs, ambiguous_fmt_datakey=ambiguous_fmt_datakey)
File ~/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/matplotlib/axes/_base.py:539, in _process_plot_var_args._plot_args(self, axes, tup, kwargs, return_kwargs, ambiguous_fmt_datakey)
537 return list(result)
538 else:
--> 539 return [l[0] for l in result]
File ~/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/matplotlib/axes/_base.py:539, in <listcomp>(.0)
537 return list(result)
538 else:
--> 539 return [l[0] for l in result]
File ~/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/matplotlib/axes/_base.py:532, in <genexpr>(.0)
529 else:
530 labels = [label] * n_datasets
--> 532 result = (make_artist(axes, x[:, j % ncx], y[:, j % ncy], kw,
533 {**kwargs, 'label': label})
534 for j, label in enumerate(labels))
536 if return_kwargs:
537 return list(result)
File ~/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/matplotlib/axes/_base.py:346, in _process_plot_var_args._makeline(self, axes, x, y, kw, kwargs)
344 default_dict = self._getdefaults(set(), kw)
345 self._setdefaults(default_dict, kw)
--> 346 seg = mlines.Line2D(x, y, **kw)
347 return seg, kw
File ~/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/matplotlib/lines.py:407, in Line2D.__init__(self, xdata, ydata, linewidth, linestyle, color, gapcolor, marker, markersize, markeredgewidth, markeredgecolor, markerfacecolor, markerfacecoloralt, fillstyle, antialiased, dash_capstyle, solid_capstyle, dash_joinstyle, solid_joinstyle, pickradius, drawstyle, markevery, **kwargs)
403 self.set_markeredgewidth(markeredgewidth)
405 # update kwargs before updating data to give the caller a
406 # chance to init axes (and hence unit support)
--> 407 self._internal_update(kwargs)
408 self.pickradius = pickradius
409 self.ind_offset = 0
File ~/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/matplotlib/artist.py:1219, in Artist._internal_update(self, kwargs)
1212 def _internal_update(self, kwargs):
1213 """
1214 Update artist properties without prenormalizing them, but generating
1215 errors as if calling `set`.
1216
1217 The lack of prenormalization is to maintain backcompatibility.
1218 """
-> 1219 return self._update_props(
1220 kwargs, "{cls.__name__}.set() got an unexpected keyword argument "
1221 "{prop_name!r}")
File ~/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/matplotlib/artist.py:1195, in Artist._update_props(self, props, errfmt)
1192 if not callable(func):
1193 raise AttributeError(
1194 errfmt.format(cls=type(self), prop_name=k))
-> 1195 ret.append(func(v))
1196 if ret:
1197 self.pchanged()
File ~/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/matplotlib/artist.py:766, in Artist.set_clip_box(self, clipbox)
754 def set_clip_box(self, clipbox):
755 """
756 Set the artist's clip `.Bbox`.
757
(...)
764
765 """
--> 766 _api.check_isinstance((BboxBase, None), clipbox=clipbox)
767 if clipbox != self.clipbox:
768 self.clipbox = clipbox
File ~/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/matplotlib/_api/__init__.py:91, in check_isinstance(types, **kwargs)
89 names.remove("None")
90 names.append("None")
---> 91 raise TypeError(
92 "{!r} must be an instance of {}, not a {}".format(
93 k,
94 ", ".join(names[:-1]) + " or " + names[-1]
95 if len(names) > 1 else names[0],
96 type_name(type(v))))
TypeError: 'clipbox' must be an instance of matplotlib.transforms.BboxBase or None, not a tuple
Here, mne.info():
Platform macOS-13.5.2-arm64-arm-64bit
Python 3.9.16 | packaged by conda-forge | (main, Feb 1 2023, 21:38:11) [Clang 14.0.6 ]
Executable /Users/makoto/opt/anaconda3/envs/myenv/bin/python
CPU arm (8 cores)
Memory 16.0 GB
Core
ββ mne 1.5.1
ββ numpy 1.23.5 (OpenBLAS 0.3.20 with 8 threads)
ββ scipy 1.10.0
ββ matplotlib 3.8.0 (backend=module://matplotlib_inline.backend_inline)
ββ pooch 1.7.0
ββ jinja2 3.1.2
Numerical (optional)
ββ sklearn 1.3.0
ββ numba 0.57.1
ββ nibabel 5.1.0
ββ dipy 1.7.0
ββ pandas 2.0.3
ββ unavailable nilearn, openmeeg, cupy
Visualization (optional)
ββ pyvista 0.42.1 (OpenGL 4.1 Metal - 83.1 via Apple M1)
ββ pyvistaqt 0.11.0
ββ vtk 9.2.6
ββ ipywidgets 8.1.1
ββ unavailable qtpy, ipympl, pyqtgraph, mne-qt-browser, trame_client, trame_server, trame_vtk, trame_vuetify
Ecosystem (optional)
ββ unavailable mne-bids, mne-nirs, mne-features, mne-connectivity, mne-icalabel, mne-bids-pipeline