plot_topomap visulization value issue

I want to use the function mne.viz.plot_topomap to visulize a list of correlation value with shape(62,),. They are all positive value, but in the final plot it seems like it has negtive value, see the blue part.

How can I solve this?

Hello Mokita,

did you change the colorbar limits within the function parameters? If not then it will have default settings according to this:
viz.plot_topomap():

vlim tuple of length 2

Lower and upper bounds of the colormap, typically a numeric value in the same units as the data. If both entries are None, the bounds are set at (min(data), max(data)). Providing None for just one entry will set the corresponding boundary at the min/max of the data. Defaults to (None, None).

You can adjust the colorbar limits yourself to set e.g. a range from 0 to 1. Keep in mind that the colors for the colorbar will change (all reds for positive values), but you can change the colorschema with the cmap parameter if you are not happy with the default colors.

Hope this helps.
Best,

Carina

In addition to @CarinaFo’s comment, these negative values are likely due to the function extrapolating values to the head border. To prevent these artifacts, adjust relevant arguments like border (e.g., set it to 0), extrapolate, and image_interp.