# Plotting sEEG contacts

**URL:** <https://mne.discourse.group/t/plotting-seeg-contacts/3949>\
**Category:** Support & Discussions\
**Tags:** ieeg-and-ecog, visualization\
**Created:** [November 13, 2021, 5:40pm UTC](https://mne.discourse.group/t/plotting-seeg-contacts/3949 "2021-11-13T17:40:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![BarryLiu97](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/barryliu97/32/33_2.png) [@BarryLiu97](https://mne.discourse.group/u/BarryLiu97)\
**Post date:** [November 13, 2021, 5:40pm UTC](https://mne.discourse.group/t/plotting-seeg-contacts/3949/1 "2021-11-13T17:40:56Z")

</div>

Hi, I may have a similar question. I did freesurfer’s recon-all. And I want to plot the SEEG contacts(in MNI space) in lh.pial and lr.pial of this subject.  
I don’t know if I understand right. I’m following the tutorial here [How MNE uses FreeSurfer’s outputs — MNE 0.24.0 documentation](https://mne.tools/stable/auto_tutorials/forward/50_background_freesurfer_mne.html#mni-affine-transformation)  
This is what I did.

```python
import mne
import nibabel as nib
mri_mni_trans = mne.read_talxfm(subject, subjects_dir)
ver, face = nib.freesurfer.read_geometry(lh_pial_path)
ver_mni = apply_trans(mri_mni_trans, ver)

```

with ver, so I could plot this pial in MNI together with SEEG contacts.  
However, the result seems not right. Where did I do wrong?

 ![image](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/d8ebda7e8d5c7c5726de21e93b2cd1eeb969d7f1.jpeg)

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [November 13, 2021, 6:55pm UTC](https://mne.discourse.group/t/plotting-seeg-contacts/3949/2 "2021-11-13T18:55:02Z")

</div>

@BarryLiu97 I’ve moved your message to a new topic. Please always create a new topic for a new question to make conversation easier. Thank you!

cc @alexrockhill

---

<div class="post-metadata">

**Author:** ![alexrockhill](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/alexrockhill/32/31_2.png) [@alexrockhill](https://mne.discourse.group/u/alexrockhill)\
**Post date:** [November 13, 2021, 7:25pm UTC](https://mne.discourse.group/t/plotting-seeg-contacts/3949/3 "2021-11-13T19:25:04Z")

</div>

That case is handled exactly in [Working with sEEG data — MNE 1.0.dev0 documentation](https://mne.tools/dev/auto_tutorials/clinical/20_seeg.html), is there something there that is unclear?

---

<div class="post-metadata">

**Author:** ![alexrockhill](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/alexrockhill/32/31_2.png) [@alexrockhill](https://mne.discourse.group/u/alexrockhill)\
**Post date:** [November 13, 2021, 7:26pm UTC](https://mne.discourse.group/t/plotting-seeg-contacts/3949/4 "2021-11-13T19:26:49Z")

</div>

Also your code doesn’t cover how you plotted the contacts and clearly there is a coordinate frame mismatch so that information is needed too.

---

<div class="post-metadata">

**Author:** ![BarryLiu97](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/barryliu97/32/33_2.png) [@BarryLiu97](https://mne.discourse.group/u/BarryLiu97)\
**Post date:** [November 13, 2021, 7:28pm UTC](https://mne.discourse.group/t/plotting-seeg-contacts/3949/5 "2021-11-13T19:28:11Z")

</div>

My contacts are in MNI space, just like the form in the tutorial (x, y, z) in mm. when I use ‘fsaverage’, the figure was right. So I was thinking whether I transform the pial in a wrong way.

---

<div class="post-metadata">

**Author:** ![alexrockhill](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/alexrockhill/32/31_2.png) [@alexrockhill](https://mne.discourse.group/u/alexrockhill)\
**Post date:** [November 13, 2021, 7:40pm UTC](https://mne.discourse.group/t/plotting-seeg-contacts/3949/6 "2021-11-13T19:40:19Z")

</div>

If you put your contact locations in a montage and assigned it to a `raw` object with fiducials, that would transform the contacts into “head” space because that’s how MNE stores coordinates internally. So it’s a bit more complicated and without the full code to reproduce your figure, I really can’t guess what is going wrong.

---

<div class="post-metadata">

**Author:** ![BarryLiu97](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/barryliu97/32/33_2.png) [@BarryLiu97](https://mne.discourse.group/u/BarryLiu97)\
**Post date:** [November 14, 2021, 12:28pm UTC](https://mne.discourse.group/t/plotting-seeg-contacts/3949/7 "2021-11-14T12:28:15Z")

</div>

Hi, I would post my code and data here after organizing it.
