Skip to content

[BUG/MAINT] Topomap image_interp='None' still interpolates #10579

@alexrockhill

Description

@alexrockhill

In writing #10571, having values that are not spatially continuous over a topomap made for real problems with the existing interpolation methods so I added a Voronoi option. The following code uses image_interp='None' but in my mind, this is still applying an interpolation. I was planning on adding the Voronoi option to image_interp but I thought maybe it should replace None. In the matplotlib documentation, the interpolations are demonstrated on images, which makes much more sense for None, but with points, I think this behavior is unexpected--for me, I just want an option to see the raw data. I added a new opinions-wanted tag because I think this is an especially good one to hear what other people think.

import os.path as op
import mne
import matplotlib.pyplot as plt

data_path = mne.datasets.sample.data_path()
evoked =mne.read_evokeds(op.join(data_path, 'MEG', 'sample', 'sample_audvis-ave.fif'))[0]
evoked.pick_types(eeg=True)
evoked.apply_proj()
fig, ax = plt.subplots()
mne.viz.plot_topomap(evoked.data.mean(axis=1), evoked.info, image_interp='None', axes=ax)   # still interpolates

Screen Shot 2022-04-28 at 11 33 00 AM

The Voronoi plot looks like this:

Screen Shot 2022-04-28 at 12 26 56 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions