# Getting topomap data

**URL:** <https://mne.discourse.group/t/getting-topomap-data/7332>\
**Category:** Support & Discussions\
**Created:** [August 5, 2023, 5:51pm UTC](https://mne.discourse.group/t/getting-topomap-data/7332 "2023-08-05T17:51:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BucketofJava](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/bucketofjava/32/2931_2.png) [@BucketofJava](https://mne.discourse.group/u/BucketofJava)\
**Post date:** [August 5, 2023, 5:51pm UTC](https://mne.discourse.group/t/getting-topomap-data/7332/1 "2023-08-05T17:51:24Z")

</div>

Hi there!  
I am trying to get the data plotted in mne.viz.plot\_topomap from EEG data, as opposed to just the image. As in, I want the 2d array of values of microvolts that is plotted in the image. Is there any way to do this? I’ve been searching through the docs and can’t find a way.  
If there isn’t a way, is there any way to get the (x, y) positions of sensors so I can try to compute it myself?

---

<div class="post-metadata">

**Author:** ![mscheltienne](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/mscheltienne/32/827_2.png) [@mscheltienne](https://mne.discourse.group/u/mscheltienne)\
**Post date:** [August 7, 2023, 8:11am UTC](https://mne.discourse.group/t/getting-topomap-data/7332/2 "2023-08-07T08:11:21Z")

</div>

Hello,

Could you share a code snippet with the function you use to create a topographic map?  
A topographic map can represent different data, different information. You can in fact create your own topographic maps with `mne.viz.plot_topomap`, where you need to provide 2 pieces of information:

- data as an array of shape `(n_channels,)`
- sensor location, the easiest is by providing an `mne.Info`  
The topographic map is then a simple 64x64 grid inteprolation (see the `res` argument).

In `mne-icalabel` we also have a topographic map function, adapted from MNE-Python, which takes in input the data array and the sensor location and returns the `(n_pixels, n_pixels)` array.

> <https://github.com/mne-tools/mne-icalabel/blob/241cb4ab66ca5e4f921b5c2d3d8ece8abcc3a15c/mne_icalabel/features/topomap.py#L92-L140>

Hope this helps,  
Mathieu

---

<div class="post-metadata">

**Author:** ![BucketofJava](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/bucketofjava/32/2931_2.png) [@BucketofJava](https://mne.discourse.group/u/BucketofJava)\
**Post date:** [August 7, 2023, 5:13pm UTC](https://mne.discourse.group/t/getting-topomap-data/7332/3 "2023-08-07T17:13:10Z")

</div>

Here is the line of code to plot the topomap:  
`epochs_ica.average().plot_topomap(times, average=0.050)`  
This is epoched EEG data after applying ICA to attempt to remove EOG artifacts.  
What I’m mainly wondering is if there’s a way to get the topomap for each point in time from a raw, epochs, or evoked object.  
Thank you so much for your response

---

<div class="post-metadata">

**Author:** ![drammock](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/drammock/32/4_2.png) [@drammock](https://mne.discourse.group/u/drammock)\
**Post date:** [August 8, 2023, 7:10pm UTC](https://mne.discourse.group/t/getting-topomap-data/7332/4 "2023-08-08T19:10:12Z")

</div>

there is a method [evoked.animate\_topomap()](https://mne.tools/stable/generated/mne.Evoked.html#mne.Evoked.animate_topomap) but it doesn’t exist for `Raw` or `Epochs`.
