# Sphere coordinates on MNI brain with add\_foci

**URL:** <https://mne.discourse.group/t/sphere-coordinates-on-mni-brain-with-add-foci/11253>\
**Category:** Support & Discussions\
**Created:** [June 5, 2025, 9:54am UTC](https://mne.discourse.group/t/sphere-coordinates-on-mni-brain-with-add-foci/11253 "2025-06-05T09:54:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tvluu](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/tvluu/32/4050_2.png) [@tvluu](https://mne.discourse.group/u/tvluu)\
**Post date:** [June 5, 2025, 9:54am UTC](https://mne.discourse.group/t/sphere-coordinates-on-mni-brain-with-add-foci/11253/1 "2025-06-05T09:54:19Z")

</div>

MNE Version: 1.9.0  
Operating System: Windows 11

Hi,  
I’m trying to plot spheres representing specific coordinates onto an MNI brain template. I’ve already run the recon-all FreeSurfer pipeline on this brain for other purposes (like using it as a morph target).  
I’ve written/copied some code to visualize the sphere, and I’ve manually double-checked the MNI coordinate in a separate MRI viewer to confirm their correct location. However, when I run my code, the spheres are incorrectly appearing on what seems to be S1 (the primary somatosensory cortex) instead of the intended MNI location (M1).

Here is my code:

```python
import mne
import numpy as np
# Define subjects directory and subject
subjects_dir = r'C:\Users\User\Research\subjects_dir'
subject = 'mni152'
# Create brain plot
brain = mne.viz.Brain(
    subject=subject,
    hemi='lh',
    surf='pial',
    subjects_dir=subjects_dir,
    background='white',
    alpha=0.8,
    units = "mm"
)
xyz= np.array([[-36, -20, 52]])
mri_mni_trans = mne.read_talxfm(subject, subjects_dir)
xyz_mni = apply_trans(mri_mni_trans, xyz)

brain.add_foci(
    xyz_mni,
    coords_as_verts=False,  
    scale_factor=1,
    color='blue',
    hemi='lh',
    alpha=0.8
)
brain.show()

```

Could somebody explain me what part I am not understanding or if there is an obvious error in my approach or the code itself that might be causing this mislocation?  
Plotting either xyz or xyz\_mni seem to land on S1 instead of M1.  
Any help or suggestions would be greatly appreciated!

Thanks!

---

<div class="post-metadata">

**Author:** ![wmvanvliet](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/wmvanvliet/32/100_2.png) [@wmvanvliet](https://mne.discourse.group/u/wmvanvliet)\
**Post date:** [June 11, 2025, 5:24pm UTC](https://mne.discourse.group/t/sphere-coordinates-on-mni-brain-with-add-foci/11253/2 "2025-06-11T17:24:05Z")

</div>

maybe an issue of millimeters versus meters?
