I want to visualize some surface-level effect size maps on top of a 3D brain. What are some good python-based methods for this?
There are a few different options:
I personally like the surface plotting in nilearn. The interactive plot works well with jupyter notebooks and jupyter books.
Some people really like Pycortex from the Gallant lab. I had a lot of difficulty installing it and getting it to work last time I tried a few years ago. The visualizations they make with it are amazing if you can get it to work.
The connectome workbench is open source, but not python based.
I usually use
nilearn too, but there’s also:
PySurfer (examples), which makes really nice plots and was written in part by Michael Waskom (
- visbrain (examples, paper), which I’ve never used but know other people in the department have and like
I also had a ton of trouble getting Pycortex to work when I tried to use it a couple years ago. At the time, it turned out to be because Pycortex assumes it’s installed on NeuroDebian and tries to run FSL commands using the names NeuroDebian assigns to FSL binaries. It might be fixed now, but if not, here is everything I had to change on my fork to make it work on MacOS.