Skip to main content

A package for automated plotting of neuroimaging maps using Connectome Workbench.

Project description

Automated plotting of neuroimaging maps from Python using Connectome Workbench.

This package is intended for users who want to generate images which illustrate scalar data on a brain surface, from within their Python scripts.


Step 1. Make sure you have Connectome Workbench v1.3+ installed.

Step 2. Install wbplot and dependencies.

  • Clone the repository and install manually: git clone
  • Or just use pip: pip install wbplot


Assuming x is a NumPy array containing scalar values mapped onto each of the 360 parcels in the Human Connectome Project's MMP1.0 parcellation:

from wbplot import pscalar
pscalar("/path/to/image.png", x)

Assuming y is a NumPy array containing dense scalar values mapped onto the 59412 surface vertices in a standard bilateral 32k surface mesh:

from wbplot import dscalar
dscalar("/path/to/image.png", y)


  • wbplot currently only supports cortical data. Parcellated data must also be in the HCP MMP1.0 parcellation. Dense data must be registered to a standard 32k surface mesh.
  • Down the line I'd be open to adding subcortical support and other functionality if people are interested.
  • More detailed explanations of the functionality can be found in the scripts in the examples directory.

Change Log

  • 1.0.14 Fixed an issue that caused wbplot to break when using nibabel>=3.2.0.
  • 1.0.13 Attempted to fix a bug which threw an error on Windows machines. FOLLOW-UP: Due to Connectome Workbench itself, Windows is currently NOT SUPPORTED.
  • 1.0.12 Fixed bug in list of available colormaps; ROY-BIG-BL and videen_style are now supported.
  • 1.0.11 Dependency version updates.
  • 1.0.10 Patched keyword argument bug in wbplot.dscalar.
  • 1.0.9 Fixed bug in images.check_dscalars().
  • 1.0.8 Fixed it for real now.
  • 1.0.7 Fixed type checking bug in images module.
  • 1.0.6 Added errors raised to docstrings and cleaned up a few files.
  • 1.0.5 Last patch didn't fix the problem.
  • 1.0.4 ImageParcellated loaded into dense scenes resulted in error messages printed to console.
  • 1.0.3 Entirely changed the way data are read from and written to, to circumnavigate permissions issues.
  • 1.0.2 Error in -- not all necessary data files included in build.
  • 1.0.1 Small error in README.
  • 1.0 Initial release.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wbplot-1.0.14.tar.gz (20.2 MB view hashes)

Uploaded source

Built Distribution

wbplot-1.0.14-py3-none-any.whl (20.3 MB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page