Skip to content

add plotting function to new cluster test api - #14399

Open
CarinaFo wants to merge 33 commits into
mne-tools:mainfrom
CarinaFo:plot_cluster_test_output
Open

CarinaFo wants to merge 33 commits into
mne-tools:mainfrom
CarinaFo:plot_cluster_test_output

Conversation

@CarinaFo

@CarinaFo CarinaFo commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Adds plot_joint method to cluster_result.
This implementation only supports 2D data, 3D data will be tackled in a separate PR.

Tutorial dataset does not contain a significant cluster, might be a good idea to switch to different data but this will be addressed in a separate PR.

@scott-huberty

Copy link
Copy Markdown
Contributor

@CarinaFo FYI if it is helpful. @dnacombo proposed a couple plotting methods over at #12663 in commit 72466a8 , but we decided to table it at the time in order to keep the diff manageable. Feel free to re-use!

@CarinaFo
CarinaFo marked this pull request as ready for review October 18, 2026 09:29
@scott-huberty

Copy link
Copy Markdown
Contributor
  • add support for 3D data (maybe new PR?)

based on be5e438 and b368507 it seems like you are saving this for a future PR.. Which I totally agree with.. Keeps the diff managable for review 😅

cmap="RdBu_r",
vmin=-vlim,
vmax=vlim,
# Plot cluster result statistic (for now without the actual cluster highlighted)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CarinaFo feel free to ping me when are ready for others to try this out (not sure if this comment means there is work you plan to do before putting this up for review0.

@CarinaFo CarinaFo Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realised that right now we are actually not plotting a cluster but the t-values from the cluster results, which is maybe also interesting for users but we should at least provide the option to highlight clusters. I am still thinking how to do that (probably masking timepoints and channels) and just select the cluster with the lowest p-value? If you have ideas/comments would be great.

Update: plot_joint supports now highlighting the cluster extent but I haven't tested it properly yet so put it back to draft mode

Will ping you once I am happy with the tests and ready for a first review

@CarinaFo CarinaFo Nov 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I am ready for a first review, the last part in the tutorial is the min_adjacency that @dnacombo added, I am not sure if we should keep this part in this tutorial or put it separately.
Currently plot joint plots 5 topoplots max (hardcoded), I didn't want to add an additional parameter, but can be discussed of course.

@CarinaFo
CarinaFo marked this pull request as draft October 31, 2026 07:57
@CarinaFo
CarinaFo marked this pull request as ready for review November 30, 2026 07:19
@larsoner

larsoner commented Dec 1, 2026

Copy link
Copy Markdown
Member

@scott-huberty @dnacombo can you look? If not I can, but I think you're both better suited

@larsoner larsoner added this to the 1.14 milestone Dec 1, 2026
@scott-huberty

Copy link
Copy Markdown
Contributor

Not today but I'll play around with this locally and review. Excited to test it out!

@dnacombo

dnacombo commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Sorry, I can't this week. I'll make a note for next week. Thanks.

This branch has not been deployed

No deployments
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.

4 participants