code: def test_plot_epochs_basic(
      epochs, epochs_full, noise_cov_io, capsys, browser_backend
  ):
      """Test epoch plotting."""
      assert len(epochs.events) == 1
      with epochs.info._unlock():
          epochs.info[
              "lowpass"
          ] = 10.0  # allow heavy decim during plotting
      fig = epochs.plot(scalings=None, title="Epochs")
      ticks = fig._get_ticklabels("x")
      assert ticks == ["2"]
      browser_backend._close_all()
      # covariance / whitening
      assert len(noise_cov_io["names"]) == 366  # all channels
      assert noise_cov_io["bads"] == []
      assert epochs.info["bads"] == []  # all good
      with pytest.warns(RuntimeWarning, match="projection"):
          epochs.plot(noise_cov=noise_cov_io)
      browser_backend._close_all()
      # add a channel to the epochs.info['bads']
      epochs.info["bads"] = [epochs.ch_names[0]]
      with pytest.warns(RuntimeWarning, match="projection"):
          epochs.plot(noise_cov=noise_cov_io)
      browser_backend._close_all()
      # add a channel to cov['bads']
      noise_cov_io["bads"] = [epochs.ch_names[1]]
      with pytest.warns(RuntimeWarning, match="projection"):
          epochs.plot(noise_cov=noise_cov_io)
      browser_backend._close_all()
      # have a data channel missing from the covariance
      noise_cov_io["names"] = noise_cov_io["names"][:306]
      noise_cov_io["data"] = noise_cov_io["data"][:306][:306]
      with pytest.warns(RuntimeWarning, match="projection"):
          epochs.plot(noise_cov=noise_cov_io)
      browser_backend._close_all()
      # other options
      fig = epochs[0].plot(picks=[0, 2, 3], scalings=None)
      fig._fake_keypress("escape")
      with pytest.raises(
          ValueError, match="No appropriate channels found"
      ):
          epochs.plot(picks=[])
      # gh-5906
      assert len(epochs_full) == 7
      epochs_full.info["bads"] = [epochs_full.ch_names[0]]
      capsys.readouterr()
      # test title error handling
      with pytest.raises(
          TypeError, match="title must be None or a string, got"
      ):
          epochs_full.plot(title=7)
      # test auto-generated title, and selection mode
      epochs_full.plot(group_by="selection", title="")
  
imports: import platform
  import matplotlib.pyplot
  import numpy
  import pytest
  from mne import Epochs, EpochsArray, create_info
  from mne.datasets import testing
  from mne.event import make_fixed_length_events
  from mne.viz import plot_drop_log
label_desc: Use image node_id 2 for calling a global function with example usage: test_plot_epochs_basic(epochs, epochs_full, noise_cov_io, capsys, browser_backend) without return types