Skip to content

ENH: add cmap parameter to Evoked.animate_topomap#13756

Open
HansujaB wants to merge 5 commits intomne-tools:mainfrom
HansujaB:add_cmap_to_animate_topomap
Open

ENH: add cmap parameter to Evoked.animate_topomap#13756
HansujaB wants to merge 5 commits intomne-tools:mainfrom
HansujaB:add_cmap_to_animate_topomap

Conversation

@HansujaB
Copy link

Reference issue

Fixes #12418

What does this implement/fix?

This PR adds a cmap parameter to Evoked.animate_topomap, allowing users to specify the colormap used for the animated topomap. Previously the colormap was chosen internally based on the data (e.g., "Reds" or "RdBu_r"), and users could not override it.

The new parameter brings the API closer to plot_topomap, which already supports a cmap argument.

Additional information

  • If cmap=None, the previous default behavior is preserved.

  • The parameter is passed through to the internal animation functions so that the specified colormap is used when rendering the topomap.

  • A new test has been added to verify that:
    -> The default behavior still works
    -> A custom colormap (e.g., "viridis") is correctly applied.

To Discuss

plot_topomap exposes several additional parameters (e.g., cnorm, colorbar, etc.) that are not currently available in Evoked.animate_topomap. If it would be useful, I would be happy to extend the animation API to support some of these parameters in follow-up PRs.

@welcome
Copy link

welcome bot commented Mar 15, 2026

Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add cmap to animate_topomap

1 participant