diff --git a/circle.yml b/circle.yml index 5e0328d116a..6f6451163f1 100644 --- a/circle.yml +++ b/circle.yml @@ -37,8 +37,8 @@ dependencies: else echo "Conda already set up."; fi - - conda install -n circleenv --yes numpy scipy scikit-learn matplotlib sphinx=1.4.1 pillow six IPython pandas apptools=4.4.0 envisage=4.5.1 pyface=5.1.0 traits=4.6.0 traitsui=5.1.0 vtk=5.10.1; - - pip install mayavi==4.4.4; + # Let's use old Mayavi because 4.5.0 (as of 2016/12/20) breaks plot_mne_inverse_coherence_epochs.py + - conda install -n circleenv --yes numpy scipy scikit-learn matplotlib sphinx pillow six IPython pandas mayavi vtk; - ls -al /home/ubuntu/miniconda; - ls -al /home/ubuntu/miniconda/bin; - echo $PATH; diff --git a/mne/viz/misc.py b/mne/viz/misc.py index 084e310a8e9..cb80ae4953d 100644 --- a/mne/viz/misc.py +++ b/mne/viz/misc.py @@ -108,28 +108,25 @@ def plot_cov(cov, info, exclude=[], colorbar=True, proj=False, show_svd=True, import matplotlib.pyplot as plt - fig_cov, axes = plt.subplots(1, len(idx_names), + fig_cov, axes = plt.subplots(1, len(idx_names), squeeze=False, figsize=(2.5 * len(idx_names), 2.7)) - if isinstance(axes, plt.Axes): - axes = [axes] for k, (idx, name, _, _) in enumerate(idx_names): - axes[k].imshow(C[idx][:, idx], interpolation="nearest", cmap='RdBu_r') - axes[k].set(title=name) + axes[0, k].imshow(C[idx][:, idx], interpolation="nearest", + cmap='RdBu_r') + axes[0, k].set(title=name) fig_cov.subplots_adjust(0.04, 0.0, 0.98, 0.94, 0.2, 0.26) tight_layout(fig=fig_cov) fig_svd = None if show_svd: - fig_svd, axes = plt.subplots(1, len(idx_names)) - if isinstance(axes, plt.Axes): - axes = [axes] + fig_svd, axes = plt.subplots(1, len(idx_names), squeeze=False) for k, (idx, name, unit, scaling) in enumerate(idx_names): s = linalg.svd(C[idx][:, idx], compute_uv=False) # Protect against true zero singular values s[s <= 0] = 1e-10 * s[s > 0].min() - axes[k].semilogy(np.sqrt(s) * scaling) - axes[k].set(ylabel='Noise std (%s)' % unit, - xlabel='Eigenvalue index', title=name) + axes[0, k].semilogy(np.sqrt(s) * scaling) + axes[0, k].set(ylabel='Noise std (%s)' % unit, + xlabel='Eigenvalue index', title=name) tight_layout(fig=fig_svd) plt_show(show) diff --git a/tutorials/plot_brainstorm_auditory.py b/tutorials/plot_brainstorm_auditory.py index 7e1cfb365ab..07ef7f19bf4 100644 --- a/tutorials/plot_brainstorm_auditory.py +++ b/tutorials/plot_brainstorm_auditory.py @@ -10,6 +10,7 @@ http://neuroimage.usc.edu/brainstorm/Tutorials/Auditory Experiment: + - One subject, 2 acquisition runs 6 minutes each. - Each run contains 200 regular beeps and 40 easy deviant beeps. - Random ISI: between 0.7s and 1.7s seconds, uniformly distributed.