# Author: Eric Larson <larson.eric.d@gmail.com>
#
# License: BSD-3-Clause

# %%

import mne
from mne.viz import plot_alignment, set_3d_view

print(__doc__)

data_path = mne.datasets.sample.data_path()
subjects_dir = data_path + '/subjects'
trans = mne.read_trans(data_path + '/MEG/sample/sample_audvis_raw-trans.fif')
raw = mne.io.read_raw_fif(data_path + '/MEG/sample/sample_audvis_raw.fif')
# Plot electrode locations on scalp
fig = plot_alignment(raw.info, trans, subject='sample', dig=False,
                     eeg=['original', 'projected'], meg=[],
                     coord_frame='head', subjects_dir=subjects_dir)
# Set viewing angle
set_3d_view(figure=fig, azimuth=135, elevation=80)

# %%
# A similar effect can be achieved using :class:`mne.viz.Brain`:

brain = mne.viz.Brain(
    'sample', 'both', 'pial', 'frontal', background='w',
    subjects_dir=subjects_dir)
brain.add_head()
brain.add_sensors(raw.info, trans, meg=False, eeg=('original', 'projected'))

# Author: Eric Larson <larson.eric.d@gmail.com>
#
# License: BSD-3-Clause

# %%

import mne
from mne.viz import plot_alignment, set_3d_view

print(__doc__)

data_path = mne.datasets.sample.data_path()
subjects_dir = data_path + '/subjects'
trans = mne.read_trans(data_path + '/MEG/sample/sample_audvis_raw-trans.fif')
raw = mne.io.read_raw_fif(data_path + '/MEG/sample/sample_audvis_raw.fif')
# Plot electrode locations on scalp
fig = plot_alignment(raw.info, trans, subject='sample', dig=False,
                     eeg=['original', 'projected'], meg=[],
                     coord_frame='head', subjects_dir=subjects_dir)
# Set viewing angle
set_3d_view(figure=fig, azimuth=135, elevation=80)

Remove brain example [skip azp] [skip actions]
FIX: Remove brain example [skip azp] [skip actions]

  # Author: Eric Larson <larson.eric.d@gmail.com>
  #
  # License: BSD-3-Clause
  
  # %%
  
  import mne
  from mne.viz import plot_alignment, set_3d_view
  
  print(__doc__)
  
  data_path = mne.datasets.sample.data_path()
  subjects_dir = data_path + '/subjects'
  trans = mne.read_trans(data_path + '/MEG/sample/sample_audvis_raw-trans.fif')
  raw = mne.io.read_raw_fif(data_path + '/MEG/sample/sample_audvis_raw.fif')
  # Plot electrode locations on scalp
  fig = plot_alignment(raw.info, trans, subject='sample', dig=False,
                       eeg=['original', 'projected'], meg=[],
                       coord_frame='head', subjects_dir=subjects_dir)
  # Set viewing angle
  set_3d_view(figure=fig, azimuth=135, elevation=80)
  
- # %%
- # A similar effect can be achieved using :class:`mne.viz.Brain`:
- 
- brain = mne.viz.Brain(
-     'sample', 'both', 'pial', 'frontal', background='w',
-     subjects_dir=subjects_dir)
- brain.add_head()
- brain.add_sensors(raw.info, trans, meg=False, eeg=('original', 'projected'))
- 
Remove brain example [skip azp] [skip actions]
## Code Before:
# Author: Eric Larson <larson.eric.d@gmail.com>
#
# License: BSD-3-Clause

# %%

import mne
from mne.viz import plot_alignment, set_3d_view

print(__doc__)

data_path = mne.datasets.sample.data_path()
subjects_dir = data_path + '/subjects'
trans = mne.read_trans(data_path + '/MEG/sample/sample_audvis_raw-trans.fif')
raw = mne.io.read_raw_fif(data_path + '/MEG/sample/sample_audvis_raw.fif')
# Plot electrode locations on scalp
fig = plot_alignment(raw.info, trans, subject='sample', dig=False,
                     eeg=['original', 'projected'], meg=[],
                     coord_frame='head', subjects_dir=subjects_dir)
# Set viewing angle
set_3d_view(figure=fig, azimuth=135, elevation=80)

# %%
# A similar effect can be achieved using :class:`mne.viz.Brain`:

brain = mne.viz.Brain(
    'sample', 'both', 'pial', 'frontal', background='w',
    subjects_dir=subjects_dir)
brain.add_head()
brain.add_sensors(raw.info, trans, meg=False, eeg=('original', 'projected'))

## Instruction:
Remove brain example [skip azp] [skip actions]
## Code After:
# Author: Eric Larson <larson.eric.d@gmail.com>
#
# License: BSD-3-Clause

# %%

import mne
from mne.viz import plot_alignment, set_3d_view

print(__doc__)

data_path = mne.datasets.sample.data_path()
subjects_dir = data_path + '/subjects'
trans = mne.read_trans(data_path + '/MEG/sample/sample_audvis_raw-trans.fif')
raw = mne.io.read_raw_fif(data_path + '/MEG/sample/sample_audvis_raw.fif')
# Plot electrode locations on scalp
fig = plot_alignment(raw.info, trans, subject='sample', dig=False,
                     eeg=['original', 'projected'], meg=[],
                     coord_frame='head', subjects_dir=subjects_dir)
# Set viewing angle
set_3d_view(figure=fig, azimuth=135, elevation=80)
