I just came across this topic and am encountering a similar, if not identical problem, which arose only yesterday and which I could not solve using the above. Running Mac (OS Big Sur 11.3.1) with Python 3.9.2, IDLE 3.9.2, matplotlib 3.4.2, and mne 0.23.0.
Here’s my code:
import mne
raw=mne.io.read_raw_edf('file.edf', preload=True)
raw.plot()
Here’s my error message:
File "/Users/fishbacp/Desktop/my_script.py", line 22, in <module> raw.plot()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/mne/io/base.py", line 1531, in plot
return plot_raw(self, events, duration, start, n_channels, bgcolor,
File "<decorator-gen-161>", line 24, in plot_raw
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mne/viz/raw.py", line 342, in plot_raw
fig = _browse_figure(**params)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mne/viz/_figure.py", line 2278, in _browse_figure
fig = _figure(inst=inst, toolbar=False, FigureClass=MNEBrowseFigure,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mne/viz/_figure.py", line 2266, in _figure
fig = figure(FigureClass=FigureClass, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/matplotlib/pyplot.py", line 797, in figure
manager = new_figure_manager(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/matplotlib/pyplot.py", line 316, in new_figure_manager
return _backend_mod.new_figure_manager(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/matplotlib/backend_bases.py", line 3544, in new_figure_manager
fig = fig_cls(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mne/viz/_figure.py", line 401, in __init__
self.subplotpars.update(left=left, bottom=bottom, top=top, right=right)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/matplotlib/figure.py", line 166, in update
raise ValueError('bottom cannot be >= top')
ValueError: bottom cannot be >= top ```
I reinstalled matplotlib and mne and restarted my computer, but this doesn’t solve the problem. The data is loaded fine, as I can print out raw.info.
I entered print(mne.get_config_path())
as suggested above. It shows
/Users/fishbacp/.mne/mne-python.json
I don’t see this file anywhere in my system. I install mne with all my other packages in
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages
Thanks
Paul