possible problem with raw.plot()

External Email - Use Caution

I am getting an error when using raw.plot with either fif or edf files. Sample code and output below. Is this a bug or am I missing something? FWIW I get the same error with python 3.8.5

Sample code (shortened from https://mne.tools/stable/auto_examples/io/plot_read_and_write_raw_data.html#sphx-glr-auto-examples-io-plot-read-and-write-raw-data-py):
import matplotlib.pyplot as plt
import mne
from mne.datasets import sample

data_path = sample.data_path()
fname = data_path + '/MEG/sample/sample_audvis_raw.fif'
raw = mne.io.read_raw_fif(fname)

print(mne.sys_info())
raw.plot()
plt.show()

Output:
Opening raw data file C:\Users\leisenman\mne_data\MNE-sample-data/MEG/sample/sample_audvis_raw.fif...
    Read a total of 3 projection items:
        PCA-v1 (1 x 102) idle
        PCA-v2 (1 x 102) idle
        PCA-v3 (1 x 102) idle
    Range : 25800 ... 192599 = 42.956 ... 320.670 secs
Ready.
Current compensation grade : 0
Platform: Windows-10-10.0.10240-SP0
Python: 3.7.8 | packaged by conda-forge | (default, Jul 31 2020, 01:53:57) [MSC v.1916 64 bit (AMD64)]
Executable: C:\Users\leisenman\AppData\Local\Continuum\miniconda3\envs\mne7\python.exe
CPU: Intel64 Family 6 Model 142 Stepping 9, GenuineIntel: 4 cores
Memory: 7.7 GB

mne: 0.20.7
numpy: 1.19.1 {blas=blas, lapack=blas}
scipy: 1.5.0
matplotlib: 3.3.0 {backend=Qt5Agg}

sklearn: 0.23.2
numba: 0.50.1
nibabel: 3.1.1
cupy: Not found
pandas: 1.1.0
dipy: 1.1.0
mayavi: 4.7.1 {qt_api=pyqt5, PyQt5=5.12.3}
pyvista: 0.25.3
vtk: 8.2.0
None
Traceback (most recent call last):
  File "c:\Users\leisenman\Box\Python\testedf\test_mne_raw.py", line 33, in <module>
    raw.plot()
  File "C:\Users\leisenman\AppData\Local\Continuum\miniconda3\envs\mne7\lib\site-packages\mne\io\base.py", line 1378, in plot
    show_scalebars=show_scalebars, verbose=verbose)
  File "<decorator-gen-138>", line 21, in plot_raw
  File "C:\Users\leisenman\AppData\Local\Continuum\miniconda3\envs\mne7\lib\site-packages\mne\viz\raw.py", line 415, in plot_raw
    n_channels)
  File "C:\Users\leisenman\AppData\Local\Continuum\miniconda3\envs\mne7\lib\site-packages\mne\viz\raw.py", line 722, in _prepare_mne_browse_raw
    ax.set_yticklabels(['X' * max([len(ch) for ch in info['ch_names']])])
  File "C:\Users\leisenman\AppData\Local\Continuum\miniconda3\envs\mne7\lib\site-packages\matplotlib\axes\_base.py", line 63, in wrapper
    return get_method(self)(*args, **kwargs)
  File "C:\Users\leisenman\AppData\Local\Continuum\miniconda3\envs\mne7\lib\site-packages\matplotlib\cbook\deprecation.py", line 451, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\leisenman\AppData\Local\Continuum\miniconda3\envs\mne7\lib\site-packages\matplotlib\axis.py", line 1793, in _set_ticklabels
    return self.set_ticklabels(labels, minor=minor, **kwargs)
  File "C:\Users\leisenman\AppData\Local\Continuum\miniconda3\envs\mne7\lib\site-packages\matplotlib\axis.py", line 1715, in set_ticklabels
    "The number of FixedLocator locations"
ValueError: The number of FixedLocator locations (20), usually from a call to set_ticks, does not match the number of ticklabels (1).

Larry

External Email - Use Caution

This is indeed a bug, it has been fixed in the development branch of MNE
and will be part of the next release (scheduled for middle of September).

Eric