def test_plot_topo_image_epochs(): """Test plotting of epochs image topography """ title = "ERF images - MNE sample data" epochs = _get_epochs() plot_topo_image_epochs(epochs, layout, sigma=0.5, vmin=-200, vmax=200, colorbar=True, title=title) plt.close("all")
def test_plot_topo_image_epochs(): """Test plotting of epochs image topography.""" title = 'ERF images - MNE sample data' epochs = _get_epochs() epochs.load_data() cmap = mne_analyze_colormap(format='matplotlib') data_min = epochs._data.min() plt.close('all') fig = plot_topo_image_epochs(epochs, sigma=0.5, vmin=-200, vmax=200, colorbar=True, title=title, cmap=cmap) assert epochs._data.min() == data_min num_figures_before = len(plt.get_fignums()) _fake_click(fig, fig.axes[0], (0.08, 0.64)) assert num_figures_before + 1 == len(plt.get_fignums()) # test for auto-showing a colorbar when only 1 sensor type ep = epochs.copy().pick_types(meg=False, eeg=True) fig = plot_topo_image_epochs(ep, vmin=None, vmax=None, colorbar=None, cmap=cmap) ax = [x for x in fig.get_children() if isinstance(x, matplotlib.axes.Axes)] qm_cmap = [ y.cmap for x in ax for y in x.get_children() if isinstance(y, matplotlib.collections.QuadMesh) ] assert qm_cmap[0] is cmap plt.close('all')
def test_plot_topo_image_epochs(): """Test plotting of epochs image topography """ import matplotlib.pyplot as plt title = 'ERF images - MNE sample data' epochs = _get_epochs() plot_topo_image_epochs(epochs, layout, sigma=0.5, vmin=-200, vmax=200, colorbar=True, title=title) plt.close('all')
def test_plot_topo_image_epochs(): """Test plotting of epochs image topography """ import matplotlib.pyplot as plt title = 'ERF images - MNE sample data' epochs = _get_epochs() cmap = mne_analyze_colormap(format='matplotlib') plot_topo_image_epochs(epochs, sigma=0.5, vmin=-200, vmax=200, colorbar=True, title=title, cmap=cmap) plt.close('all')
def test_plot_topo_image_epochs(): """Test plotting of epochs image topography """ title = 'ERF images - MNE sample data' plot_topo_image_epochs(epochs, layout, sigma=0.5, vmin=-200, vmax=200, colorbar=True, title=title)
def test_plot_topo_image_epochs(): """Test plotting of epochs image topography.""" import matplotlib.pyplot as plt title = 'ERF images - MNE sample data' epochs = _get_epochs() epochs.load_data() cmap = mne_analyze_colormap(format='matplotlib') data_min = epochs._data.min() fig = plot_topo_image_epochs(epochs, sigma=0.5, vmin=-200, vmax=200, colorbar=True, title=title, cmap=cmap) assert_equal(epochs._data.min(), data_min) _fake_click(fig, fig.axes[2], (0.08, 0.64)) plt.close('all')
def test_plot_topo_image_epochs(): """Test plotting of epochs image topography.""" title = 'ERF images - MNE sample data' epochs = _get_epochs() epochs.load_data() cmap = mne_analyze_colormap(format='matplotlib') data_min = epochs._data.min() plt.close('all') fig = plot_topo_image_epochs(epochs, sigma=0.5, vmin=-200, vmax=200, colorbar=True, title=title, cmap=cmap) assert epochs._data.min() == data_min num_figures_before = len(plt.get_fignums()) _fake_click(fig, fig.axes[0], (0.08, 0.64)) assert num_figures_before + 1 == len(plt.get_fignums()) # test for auto-showing a colorbar when only 1 sensor type ep = epochs.copy().pick_types(meg=False, eeg=True) fig = plot_topo_image_epochs(ep, vmin=None, vmax=None, colorbar=None, cmap=cmap) ax = [x for x in fig.get_children() if isinstance(x, matplotlib.axes.Axes)] qm_cmap = [y.cmap for x in ax for y in x.get_children() if isinstance(y, matplotlib.collections.QuadMesh)] assert qm_cmap[0] is cmap plt.close('all')
def test_plot_topo_image_epochs(): """Test plotting of epochs image topography.""" title = 'ERF images - MNE sample data' epochs = _get_epochs() epochs.load_data() cmap = mne_analyze_colormap(format='matplotlib') data_min = epochs._data.min() plt.close('all') fig = plot_topo_image_epochs(epochs, sigma=0.5, vmin=-200, vmax=200, colorbar=True, title=title, cmap=cmap) assert epochs._data.min() == data_min num_figures_before = len(plt.get_fignums()) _fake_click(fig, fig.axes[0], (0.08, 0.64)) assert num_figures_before + 1 == len(plt.get_fignums()) plt.close('all')