How to make topomaps in ICA.plot_components smaller?

  • MNE-Python version: 0.23.0
  • macOS

When i run

ica = ICA(n_components=20, method=method,
                  fit_params=fit_params, max_iter='auto', random_state=0)
t0 = time()
    ica.fit(raw, reject=reject,picks=picks)
    time_took = time() - t0
    title = ('ICA decomposition using %s took %.1fs)' % (method, time_took))
    ica.plot_components(title=title,inst=raw,res=20)

the result looks like this :

but i want to make topomaps smaller so clicking on title of one components wont open the one under it.

Can you try to make the figure larger? I’ve often experienced the same issue, but when I enlarged the figure, spacing between the single maps increased.

this is the maximum height and width of my screen:

OK, then this workaround isn’t really solving your issue. Unfortunately, I don’t know if the topomap sizes can be changed. It’s also curious that the head outline isn’t shown in your example, so maybe there’s something off? @mmagnuski do you know how to solve this?

@cbrnr With respect to topo outline not showing that is a pretty common issue for example when reading EEGLAB files - the units of channel positions are read incorrectly and for example instead of mm the positions are interpreted as in meters, which results in the head outline being so small that it may be almost invisible. If you zoom in on one of the topos in the images in this thread you will see that the central electrode is darker - this is the head outline. :slight_smile:
(I will create an issue for that on github to not forget about this)
Now - when it comes to topo sizes - I don’t think I ever changed the default behavior of how topos are positioned. But in cases like this you might try calling tight_layout (plt.tight_layout()) and see if this helps.

1 Like

An easy alternative is to also try to plot less components at once using the picks argument.

Thanks @mmagnuski! So there is no way to influence the size of the topomap circles (not the black outlines but the colored circular patches)?

1 Like

No, unfortunatelly I don’t think there is a way to control it through mne at the moment. It is possible to pass arguments to plot_topomap via plot_components, but plot_topomap does not have size argument, that for example Evoked.plot_topomap() has (which controls the size of the topo).

1 Like