# Plot topomap with customize ICA components

**URL:** <https://mne.discourse.group/t/plot-topomap-with-customize-ica-components/4184>\
**Category:** Support & Discussions\
**Tags:** eeg, visualization, ica\
**Created:** [December 21, 2021, 10:15am UTC](https://mne.discourse.group/t/plot-topomap-with-customize-ica-components/4184 "2021-12-21T10:15:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![peara](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/peara/32/514_2.png) [@peara](https://mne.discourse.group/u/peara)\
**Post date:** [December 21, 2021, 10:15am UTC](https://mne.discourse.group/t/plot-topomap-with-customize-ica-components/4184/1 "2021-12-21T10:15:47Z")

</div>

Hi,  
I am trying to reimplement [ICASSO](http://cis.legacy.ics.tkk.fi/jhimberg/publications/nnsp2003.pdf) in python with MNE.  
I have select some ICA components from different ICA runs and group them as a ndarray.  
I’d like visualize the selected components without needing to refer to the original `mne.preprocessing.ica`.  
Can anyone show me where should I look?  
I’m trying to use [plot\_topomap](https://mne.tools/stable/generated/mne.viz.plot_topomap.html#mne.viz.plot_topomap) but not sure what is its input.

---

<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:** [December 21, 2021, 10:25am UTC](https://mne.discourse.group/t/plot-topomap-with-customize-ica-components/4184/2 "2021-12-21T10:25:34Z")

</div>

If you want topomap, that’s the correct function. Provide `data` as an array of shape `(n_sensors, )` (one value per sensor location on the topomap) and `pos` as an `mne.io.Info` instance that contains the location/montage for all sensors.

You can create the info with `mne.create_info` and then add the montage with `info.set_montage()`.  
[https://mne.tools/stable/generated/mne.Info.html](https://mne.tools/stable/generated/mne.Info.html)

---

<div class="post-metadata">

**Author:** ![peara](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/peara/32/514_2.png) [@peara](https://mne.discourse.group/u/peara)\
**Post date:** [December 22, 2021, 6:48am UTC](https://mne.discourse.group/t/plot-topomap-with-customize-ica-components/4184/3 "2021-12-22T06:48:49Z")

</div>

Thank you. It seems I have been misunderstood the input `data`. I thought it was ICA components.

---

<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:** [December 22, 2021, 3:56pm UTC](https://mne.discourse.group/t/plot-topomap-with-customize-ica-components/4184/4 "2021-12-22T15:56:41Z")

</div>

It can be anything you want as long as you define the sensor location and value.  
The location is given in the montage of the `Info` instance, and the value is given in `data`.

For instance, I use it to plot a topographic map of sensors’ weights between 0 and 1.

---

<div class="post-metadata">

**Author:** ![peara](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/peara/32/514_2.png) [@peara](https://mne.discourse.group/u/peara)\
**Post date:** [December 24, 2021, 7:32am UTC](https://mne.discourse.group/t/plot-topomap-with-customize-ica-components/4184/5 "2021-12-24T07:32:45Z")

</div>

Many thanks, I can plot the ICA components topomap now.
