Show colorbar with plot_glass_brain?
Is this possible?  I only see true/false, and I only see this option for plot_stat_map, not plot_glass_brain for instance.

Yet, I can manipulate all the colormap properties fine:

f, axarr = plt.subplots(20)  
f.set_size_inches(10,40)  #(width, length)[inches]

nilearn.plotting.plot_glass_brain(os.path.join(file_path, file_name), 
                                  axes=axarr[0], cmap=cmx.rainbow, vmin=-8, vmax=8, threshold = 4)

diff --git a/doc/building_blocks/plotting.rst b/doc/building_blocks/plotting.rst
index 1d1e2e51..2e7341a9 100644
--- a/doc/building_blocks/plotting.rst
+++ b/doc/building_blocks/plotting.rst
@@ -24,6 +24,10 @@ different heuristics to find cutting coordinates.
      :target: ../auto_examples/manipulating_visualizing/plot_demo_plotting.html
      :scale: 50
 
+.. |plot_connectome| image:: ../auto_examples/connectivity/images/plot_adhd_covariance_5.png
+     :target: ../auto_examples/connectivity/plot_adhd_covariance.html
+     :scale: 50
+
 .. |plot_anat| image:: ../auto_examples/manipulating_visualizing/images/plot_demo_plotting_3.png
      :target: ../auto_examples/manipulating_visualizing/plot_demo_plotting.html
      :scale: 50
@@ -66,6 +70,10 @@ different heuristics to find cutting coordinates.
                      |hack|
                      Plotting ROIs, or a mask, with an optional background
 
+|plot_connectome|    :func:`plot_connectome`
+                     |hack|
+                     Plotting a connectome
+
 **plot_img**         :func:`plot_img`
                      |hack|
                      General-purpose function, with no specific presets
diff --git a/doc/data_analysis/functional_connectomes.rst b/doc/data_analysis/functional_connectomes.rst
index 3ec3bb5f..30a5eb4f 100644
--- a/doc/data_analysis/functional_connectomes.rst
+++ b/doc/data_analysis/functional_connectomes.rst
@@ -39,11 +39,11 @@ This can be achieved using the inverse of the covariance matrix, ie the
 covariances between two regions conditioned on all the others. It thus
 gives only direct connections between regions.
 
-.. |covariance| image:: ../auto_examples/connectivity/images/plot_adhd_covariance_5.png
+.. |covariance| image:: ../auto_examples/connectivity/images/plot_adhd_covariance_6.png
    :target: ../auto_examples/connectivity/plot_adhd_covariance.html
    :scale: 39
 
-.. |precision| image:: ../auto_examples/connectivity/images/plot_adhd_covariance_6.png
+.. |precision| image:: ../auto_examples/connectivity/images/plot_adhd_covariance_8.png
    :target: ../auto_examples/connectivity/plot_adhd_covariance.html
    :scale: 39
 
diff --git a/doc/index.rst b/doc/index.rst
index 46a5d7c5..17099a60 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -15,22 +15,25 @@
 
 .. Here we are building the carrousel
 
-.. |banner1| image:: auto_examples/manipulating_visualizing/images/plot_demo_plotting_glass_brain_2.png
+.. |glass_brain| image:: auto_examples/manipulating_visualizing/images/plot_demo_plotting_glass_brain_2.png
    :target: auto_examples/manipulating_visualizing/plot_demo_plotting_glass_brain.html
 
-.. |banner2| image:: auto_examples/images/plot_haxby_simple_1.png
+.. |connectome| image:: auto_examples/connectivity/images/plot_adhd_covariance_5.png
+     :target: auto_examples/connectivity/plot_adhd_covariance.html
+
+.. |haxby_weights| image:: auto_examples/images/plot_haxby_simple_1.png
    :target: auto_examples/plot_haxby_simple.html
 
-.. |banner3| image:: auto_examples/decoding/images/plot_oasis_vbm_2.png
+.. |oasis_weights| image:: auto_examples/decoding/images/plot_oasis_vbm_2.png
    :target: auto_examples/decoding/plot_oasis_vbm.html
 
-.. |banner4| image:: auto_examples/connectivity/images/plot_rest_clustering_1.png
+.. |rest_clustering| image:: auto_examples/connectivity/images/plot_rest_clustering_1.png
    :target: auto_examples/connectivity/plot_rest_clustering.html
 
-.. |banner5| image:: auto_examples/connectivity/images/plot_canica_resting_state_11.png
+.. |canica| image:: auto_examples/connectivity/images/plot_canica_resting_state_11.png
    :target: auto_examples/connectivity/plot_canica_resting_state.html
 
-.. |banner6| image:: auto_examples/decoding/images/plot_haxby_searchlight_1.png
+.. |searchlight| image:: auto_examples/decoding/images/plot_haxby_searchlight_1.png
    :target: auto_examples/decoding/plot_haxby_searchlight.html
 
 .. raw:: html
@@ -49,17 +52,19 @@
     <div class="jcarousel-wrapper">
     <div class="jcarousel">
 
-* |banner1|
+* |glass_brain|
+
+* |connectome|
 
-* |banner2|
+* |haxby_weights|
 
-* |banner3|
+* |oasis_weights|
 
-* |banner4|
+* |rest_clustering|
 
-* |banner5|
+* |canica|
 
-* |banner6|
+* |searchlight|
 
 .. raw:: html
 
diff --git a/doc/themes/nilearn/static/nature.css_t b/doc/themes/nilearn/static/nature.css_t
index ab0422e8..75dce2bb 100644
--- a/doc/themes/nilearn/static/nature.css_t
+++ b/doc/themes/nilearn/static/nature.css_t
@@ -1405,6 +1405,7 @@ div.body .jcarousel li {
 div.body div.jcarousel img {
     max-width: 420px;
     max-height: 250px;
+    vertical-align: middle;
 }
 
 
diff --git a/examples/connectivity/plot_adhd_covariance.py b/examples/connectivity/plot_adhd_covariance.py
index 00ac3f60..7b877159 100644
--- a/examples/connectivity/plot_adhd_covariance.py
+++ b/examples/connectivity/plot_adhd_covariance.py
@@ -8,8 +8,11 @@ and to estimate a covariance matrix based on these signals.
 n_subjects = 10  # subjects to consider for group-sparse covariance (max: 40)
 plotted_subject = 0  # subject index to plot
 
+import numpy as np
 
 import matplotlib.pyplot as plt
+
+from nilearn import plotting, image
 from nilearn.plotting import cm
 
 
@@ -95,13 +98,23 @@ gl.fit(subjects[plotted_subject])
 
 # Displaying results ##########################################################
 print("-- Displaying results")
-title = ("Subject {0:d} GroupSparseCovariance "
-         "$\\alpha={1:.2e}$").format(plotted_subject, gsc.alpha_)
+atlas_imgs = image.iter_img(msdl_atlas_dataset.maps)
+atlas_region_coords = [plotting.find_xyz_cut_coords(img) for img in atlas_imgs]
+
+title = "Subject {0:d} GroupSparseCovariance $\\alpha={1:.2e}$".format(
+    plotted_subject, gsc.alpha_)
+
+plotting.plot_connectome(gsc.covariances_[..., plotted_subject],
+                         atlas_region_coords, edge_threshold='90%',
+                         title=title)
 plot_matrices(gsc.covariances_[..., plotted_subject],
               gsc.precisions_[..., plotted_subject], title)
 
-title = ("Subject {0:d} GraphLasso "
-         "$\\alpha={1:.2e}$").format(plotted_subject, gl.alpha_)
+title = "Subject {0:d} GraphLasso $\\alpha={1:.2e}$".format(
+    plotted_subject, gl.alpha_)
+
+plotting.plot_connectome(gl.covariance_, atlas_region_coords,
+                         edge_threshold='90%', title=title)
 plot_matrices(gl.covariance_, gl.precision_, title)
 
 plt.show()
diff --git a/nilearn/plotting/__init__.py b/nilearn/plotting/__init__.py
index ed3bda2b..307f795d 100644
--- a/nilearn/plotting/__init__.py
+++ b/nilearn/plotting/__init__.py
@@ -31,9 +31,10 @@ _set_mpl_backend()
 
 from . import cm
 from .img_plotting import plot_img, plot_anat, plot_epi, \
-    plot_roi, plot_stat_map, plot_glass_brain
+    plot_roi, plot_stat_map, plot_glass_brain, plot_connectome
 from .find_cuts import find_xyz_cut_coords
 
 __all__ = ['cm', 'plot_img', 'plot_anat', 'plot_epi',
            'plot_roi', 'plot_stat_map', 'plot_glass_brain',
+           'plot_connectome',
            'find_xyz_cut_coords']
diff --git a/nilearn/plotting/displays.py b/nilearn/plotting/displays.py
index abb3ad8e..a65a07a4 100644
--- a/nilearn/plotting/displays.py
+++ b/nilearn/plotting/displays.py
@@ -6,17 +6,23 @@ the data with different layout of cuts.
 """
 
 import operator
+import itertools
+import numbers
 
 import numpy as np
+from scipy import sparse
 
 import nibabel
 from .._utils.testing import skip_if_running_nose
 from .. import _utils
+from .._utils.extmath import fast_abs_percentile
 
 try:
     import pylab as pl
     from matplotlib import transforms, colors
     from matplotlib.colorbar import ColorbarBase
+    from matplotlib import cm as mpl_cm
+    from matplotlib import lines
 except ImportError:
     skip_if_running_nose('Could not import matplotlib')
 
@@ -24,10 +30,10 @@ except ImportError:
 # Local imports
 from .find_cuts import find_xyz_cut_coords, find_cut_slices
 from .edge_detect import _edge_map
-from ..image.resampling import get_bounds, reorder_img, coord_transform,\
-            get_mask_bounds
+from ..image.resampling import (get_bounds, reorder_img, coord_transform,
+                                get_mask_bounds)
 
-from . import glass_brain
+from . import glass_brain, cm
 
 ################################################################################
 # class BaseAxes
@@ -184,6 +190,23 @@ class CutAxes(BaseAxes):
                 **kwargs)
 
 
+def _coords_3d_to_2d(coords_3d, direction):
+    """Project 3d coordinates into 2d ones given the direction of a cut
+    """
+    direction_to_index = {'x': [1, 2],
+                          'y': [0, 2],
+                          'z': [0, 1]}
+    index = direction_to_index.get(direction)
+
+    if index is None:
+        message = (
+            '{0} is not a valid direction. '
+            "Allowed values are 'x', 'y' and 'z'").format(direction)
+        raise ValueError(message)
+
+    return coords_3d[:, index]
+
+
 class GlassBrainAxes(BaseAxes):
     """An MPL axis-like object that displays a 2D projection of 3D
     volumes with a schematic view of the brain.
@@ -218,6 +241,61 @@ class GlassBrainAxes(BaseAxes):
         # the cuts since we are taking the max along one axis
         pass
 
+    def _add_markers(self, marker_coords, marker_color, marker_size, **kwargs):
+        """Plot markers"""
+        marker_coords_2d = _coords_3d_to_2d(marker_coords, self.direction)
+
+        xdata, ydata = marker_coords_2d.T
+
+        defaults = {'marker': 'o',
+                    'zorder': 1000}
+        for k, v in defaults.items():
+            kwargs.setdefault(k, v)
+
+        self.ax.scatter(xdata, ydata, s=marker_size,
+                        c=marker_color, **kwargs)
+
+    def _add_lines(self, line_coords, line_values, cmap, **kwargs):
+        """Plot lines
+
+            Parameters
+            ----------
+            line_coords: list of numpy arrays of shape (2, 3)
+                3d coordinates of lines start points and end points.
+            line_values: array_like
+                values of the lines.
+            cmap: colormap
+                colormap used to map line_values to a color.
+            kwargs: dict
+                additional arguments to pass to matplotlib Line2D.
+        """
+        abs_line_values_max = np.abs(line_values).max()
+        norm = colors.Normalize(vmin=-abs_line_values_max,
+                                vmax=abs_line_values_max)
+        abs_norm = colors.Normalize(vmin=0,
+                                    vmax=abs_line_values_max)
+        value_to_color = pl.cm.ScalarMappable(norm=norm, cmap=cmap).to_rgba
+
+        for start_end_point_3d, line_value in itertools.izip(
+                line_coords, line_values):
+            start_end_point_2d = _coords_3d_to_2d(start_end_point_3d,
+                                                  self.direction)
+
+            color = value_to_color(line_value)
+            abs_line_value = abs(line_value)
+            linewidth = 1 + 2 * abs_norm(abs_line_value)
+            # Hacky way to put the strongest connections on top of the weakest
+            # note sign does not matter hence using 'abs'
+            zorder = 10 + 10 * abs_norm(abs_line_value)
+            this_kwargs = {'color': color, 'linewidth': linewidth,
+                           'zorder': zorder}
+            # kwargs should have priority over this_kwargs so that the
+            # user can override the default logic
+            this_kwargs.update(kwargs)
+            xdata, ydata = start_end_point_2d.T
+            line = lines.Line2D(xdata, ydata, **this_kwargs)
+            self.ax.add_line(line)
+
 
 ################################################################################
 # class BaseSlicer
@@ -663,7 +741,7 @@ class OrthoSlicer(BaseSlicer):
             fh = self.frame_axes.get_figure()
             ax = fh.add_axes([0.3*index*(x1 - x0) + x0, y0,
                               .3*(x1 - x0), y1 - y0],
-                             axisbg=axisbg)
+                             axisbg=axisbg, aspect='equal')
             ax.axis('off')
             coord = self.cut_coords[sorted(self._cut_displayed).index(direction)]
             display_ax = self._axes_class(ax, direction, coord, **kwargs)
@@ -673,8 +751,8 @@ class OrthoSlicer(BaseSlicer):
         if self._black_bg:
             for ax in self.axes.values():
                 ax.ax.imshow(np.zeros((2, 2, 3)),
-                            extent=[-5000, 5000, -5000, 5000],
-                            zorder=-500, aspect='auto')
+                             extent=[-5000, 5000, -5000, 5000],
+                             zorder=-500, aspect='equal')
 
             # To have a black background in PDF, we need to create a
             # patch in black for the background
@@ -834,7 +912,7 @@ class BaseStackedSlicer(BaseSlicer):
             for ax in self.axes.values():
                 ax.ax.imshow(np.zeros((2, 2, 3)),
                              extent=[-5000, 5000, -5000, 5000],
-                             zorder=-500, aspect='auto')
+                             zorder=-500, aspect='equal')
 
             # To have a black background in PDF, we need to create a
             # patch in black for the background
@@ -946,6 +1024,139 @@ class OrthoProjector(OrthoSlicer):
         # the cuts since we are taking the max along one axis
         pass
 
+    def add_graph(self, adjacency_matrix, node_coords,
+                  node_color='auto', node_size=50,
+                  edge_cmap=cm.bwr, edge_threshold=None,
+                  edge_kwargs=None, node_kwargs=None):
+        """Plot undirected graph on each of the axes
+
+            Parameters
+            ----------
+            adjacency_matrix: numpy array of shape (n, n)
+                represents the edges strengths of the graph. Assumed to be
+                a symmetric matrix.
+            node_coords: numpy array_like of shape (n, 3)
+                3d coordinates of the graph nodes in world space.
+            node_color: color or sequence of colors
+                color(s) of the nodes.
+            node_size: scalar or array_like
+                size(s) of the nodes in points^2.
+            edge_cmap: colormap
+                colormap used for representing the strength of the edges.
+            edge_threshold: str or number
+                If it is a number only the edges with a value greater than
+                edge_threshold will be shown.
+                If it is a string it must finish with a percent sign,
+                e.g. "25.3%", and only the edges with a abs(value) above
+                the given percentile will be shown.
+            edge_kwargs: dict
+                will be passed as kwargs for each edge matlotlib Line2D.
+            node_kwargs: dict
+                will be passed as kwargs to the plt.scatter call that plots all
+                the nodes in one go.
+
+        """
+        # set defaults
+        if edge_kwargs is None:
+            edge_kwargs = {}
+        if node_kwargs is None:
+            node_kwargs = {}
+        if node_color == 'auto':
+            nb_nodes = len(node_coords)
+            node_color = mpl_cm.Set2(np.linspace(0, 1, nb_nodes))
+
+        node_coords = np.asarray(node_coords)
+
+        # safety checks
+        if 's' in node_kwargs:
+            raise ValueError("Please use 'node_size' and not 'node_kwargs' "
+                             "to specify node sizes")
+        if 'c' in node_kwargs:
+            raise ValueError("Please use 'node_color' and not 'node_kwargs' "
+                             "to specify node colors")
+
+        adjacency_matrix_shape = adjacency_matrix.shape
+        if (len(adjacency_matrix_shape) != 2 or
+                adjacency_matrix_shape[0] != adjacency_matrix_shape[1]):
+            raise ValueError(
+                "'adjacency_matrix' is supposed to have shape (n, n)."
+                ' Its shape was {0}'.format(adjacency_matrix_shape))
+
+        node_coords_shape = node_coords.shape
+        if len(node_coords_shape) != 2 or node_coords_shape[1] != 3:
+            raise ValueError(
+                "Invalid shape for 'node_coords'. You passed an "
+                "'adjacency_matrix' of shape {0} therefore "
+                "'node_coords' should be a array with shape ({0[0]}, 3) "
+                'while its shape was {1}'.format(adjacency_matrix_shape,
+                                                 node_coords_shape))
+
+        if node_coords_shape[0] != adjacency_matrix_shape[0]:
+            raise ValueError(
+                "Shape mismatch between 'adjacency_matrix' "
+                "and 'node_coords'"
+                "'adjacency_matrix' shape is {0}, 'node_coords' shape is {1}"
+                .format(adjacency_matrix_shape, node_coords_shape))
+
+        if sparse.issparse(adjacency_matrix):
+            adjacency_matrix = adjacency_matrix.toarray()
+
+        if not np.allclose(adjacency_matrix, adjacency_matrix.T, rtol=1e-3):
+            raise ValueError("'adjacency_matrix' should be symmetric")
+
+        # For a masked array, masked values are replaced with zeros
+        if hasattr(adjacency_matrix, 'mask'):
+            if not (adjacency_matrix.mask == adjacency_matrix.mask.T).all():
+                raise ValueError(
+                    "'adjacency_matrix' was masked with a non symmetric mask")
+            adjacency_matrix = adjacency_matrix.filled(0)
+
+        if edge_threshold is not None:
+            if isinstance(edge_threshold, basestring):
+                message = ("If 'edge_threshold' is given as a string it "
+                           'should be a number followed by the percent sign, '
+                           'e.g. "25.3%"')
+                if not edge_threshold.endswith('%'):
+                    raise ValueError(message)
+
+                try:
+                    percentile = float(edge_threshold[:-1])
+                except ValueError as exc:
+                    exc.args += (message, )
+                    raise
+
+                # Keep a percentile of edges with the highest absolute
+                # values, so only need to look at the covariance
+                # coefficients below the diagonal
+                lower_diagonal_indices = np.tril_indices_from(adjacency_matrix,
+                                                              k=-1)
+                lower_diagonal_values = adjacency_matrix[
+                    lower_diagonal_indices]
+                edge_threshold = fast_abs_percentile(
+                    lower_diagonal_values, percentile)
+
+            elif not isinstance(edge_threshold, numbers.Real):
+                raise TypeError('edge_threshold should be either a number '
+                                'or a string finishing with a percent sign')
+
+            adjacency_matrix = adjacency_matrix.copy()
+            threshold_mask = np.abs(adjacency_matrix) < edge_threshold
+            adjacency_matrix[threshold_mask] = 0
+
+        lower_triangular_adjacency_matrix = np.tril(adjacency_matrix, k=-1)
+        non_zero_indices = lower_triangular_adjacency_matrix.nonzero()
+
+        line_coords = [node_coords[list(index)]
+                       for index in itertools.izip(*non_zero_indices)]
+
+        adjacency_matrix_values = adjacency_matrix[non_zero_indices]
+        for ax in self.axes.values():
+            ax._add_markers(node_coords, node_color, node_size, **node_kwargs)
+            ax._add_lines(line_coords, adjacency_matrix_values, edge_cmap,
+                          **edge_kwargs)
+
+        pl.draw_if_interactive()
+
 
 class XProjector(OrthoProjector):
     _cut_displayed = 'x'
diff --git a/nilearn/plotting/img_plotting.py b/nilearn/plotting/img_plotting.py
index d6108159..0614b76d 100644
--- a/nilearn/plotting/img_plotting.py
+++ b/nilearn/plotting/img_plotting.py
@@ -738,3 +738,85 @@ def plot_glass_brain(stat_map_img,
                                 **kwargs)
 
     return display
+
+
+def plot_connectome(adjacency_matrix, node_coords,
+                    node_color='auto', node_size=50,
+                    edge_cmap=cm.bwr, edge_threshold=None,
+                    output_file=None, display_mode='ortho',
+                    figure=None, axes=None, title=None,
+                    annotate=True, black_bg=False,
+                    alpha=0.7,
+                    edge_kwargs=None, node_kwargs=None):
+    """Plot connectome on top of the brain glass schematics.
+
+        Parameters
+        ----------
+        adjacency_matrix: numpy array of shape (n, n)
+            represents the link strengths of the graph. Assumed to be
+            a symmetric matrix.
+        node_coords: numpy array_like of shape (n, 3)
+            3d coordinates of the graph nodes in world space.
+        node_color: color or sequence of colors
+            color(s) of the nodes.
+        node_size: scalar or array_like
+            size(s) of the nodes in points^2.
+        edge_cmap: colormap
+            colormap used for representing the strength of the edges.
+        edge_threshold: str or number
+            If it is a number only the edges with a value greater than
+            edge_threshold will be shown.
+            If it is a string it must finish with a percent sign,
+            e.g. "25.3%", and only the edges with a abs(value) above
+            the given percentile will be shown.
+        output_file : string, or None, optional
+            The name of an image file to export the plot to. Valid extensions
+            are .png, .pdf, .svg. If output_file is not None, the plot
+            is saved to a file, and the display is closed.
+        display_mode : {'ortho', 'x', 'y', 'z'}
+            Choose the direction of the cuts: 'x' - saggital, 'y' - coronal,
+            'z' - axial, 'ortho' - three cuts are performed in orthogonal
+            directions.
+        figure : integer or matplotlib figure, optional
+            Matplotlib figure used or its number. If None is given, a
+            new figure is created.
+        axes : matplotlib axes or 4 tuple of float: (xmin, ymin, width, height), optional
+            The axes, or the coordinates, in matplotlib figure space,
+            of the axes used to display the plot. If None, the complete
+            figure is used.
+        title : string, optional
+            The title dispayed on the figure.
+        annotate: boolean, optional
+            If annotate is True, positions and left/right annotation
+            are added to the plot.
+        black_bg: boolean, optional
+            If True, the background of the image is set to be black. If
+            you wish to save figures with a black background, you
+            will need to pass "facecolor='k', edgecolor='k'" to pylab's
+            savefig.
+        alpha: float between 0 and 1
+            Alpha transparency for the brain schematics.
+        edge_kwargs: dict
+            will be passed as kwargs for each edge matlotlib Line2D.
+        node_kwargs: dict
+            will be passed as kwargs to the plt.scatter call that plots all
+            the nodes in one go
+
+    """
+    display = plot_glass_brain(None,
+                               display_mode=display_mode,
+                               figure=figure, axes=axes, title=title,
+                               annotate=annotate,
+                               black_bg=black_bg)
+
+    display.add_graph(adjacency_matrix, node_coords,
+                      node_color=node_color, node_size=node_size,
+                      edge_cmap=edge_cmap, edge_threshold=edge_threshold,
+                      edge_kwargs=edge_kwargs, node_kwargs=node_kwargs)
+
+    if output_file is not None:
+        display.savefig(output_file)
+        display.close()
+        display = None
+
+    return display
diff --git a/nilearn/plotting/tests/test_img_plotting.py b/nilearn/plotting/tests/test_img_plotting.py
index 7b84bdf3..f2fc2d7d 100644
--- a/nilearn/plotting/tests/test_img_plotting.py
+++ b/nilearn/plotting/tests/test_img_plotting.py
@@ -1,9 +1,13 @@
 
 # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
 # vi: set ft=python sts=4 ts=4 sw=4 et:
-import numpy as np
 import tempfile
+import os
 from functools import partial
+
+import numpy as np
+from scipy import sparse
+
 from nose import SkipTest
 from nose.tools import assert_raises, assert_true, assert_equal
 
@@ -19,9 +23,11 @@ except ImportError:
 import nibabel
 
 from nilearn.image.resampling import coord_transform
+
 from nilearn.plotting.img_plotting import (MNI152TEMPLATE, plot_anat, plot_img,
                                            plot_roi, plot_stat_map, plot_epi,
-                                           plot_glass_brain)
+                                           plot_glass_brain, plot_connectome)
+from nilearn._utils.testing import assert_raises_regexp
 
 mni_affine = np.array([[  -2.,    0.,    0.,   90.],
                        [   0.,    2.,    0., -126.],
@@ -178,3 +184,124 @@ def test_plot_noncurrent_axes():
     for ax_name, niax in slicer.axes.items():
         ax_fh = niax.ax.get_figure()
         assert_equal(ax_fh, fh1, 'New axis %s should be in fh1.' % ax_name)
+
+
+def test_plot_connectome():
+    import pylab as pl
+    pl.switch_backend('template')
+    node_color = ['green', 'blue', 'k', 'cyan']
+    # symmetric up to 1e-3 relative tolerance
+    adjacency_matrix = np.array([[1., -2., 0.3, 0.],
+                                 [-2.002, 1, 0., 0.],
+                                 [0.3, 0., 1., 0.],
+                                 [0., 0., 0., 1.]])
+    node_coords = np.arange(3 * 4).reshape(4, 3)
+
+    args = adjacency_matrix, node_coords
+    kwargs = dict(edge_threshold=0.38,
+                  title='threshold=0.38',
+                  node_size=10, node_color=node_color)
+    plot_connectome(*args, **kwargs)
+
+    # node_coords not an array but a list of tuples
+    plot_connectome(adjacency_matrix,
+                    map(tuple, node_coords.tolist()),
+                    **kwargs)
+    # saving to file
+    with tempfile.NamedTemporaryFile(suffix='.png') as fp:
+        display = plot_connectome(*args, output_file=fp.name,
+                                  **kwargs)
+        assert_true(display is None)
+        assert_true(os.path.isfile(fp.name) and
+                    os.path.getsize(fp.name) > 0)
+
+    # with node_kwargs, edge_kwargs and edge_cmap arguments
+    plot_connectome(*args,
+                    edge_threshold='70%',
+                    node_size=[10, 20, 30, 40],
+                    node_color=np.zeros((4, 3)),
+                    edge_cmap='RdBu',
+                    node_kwargs={
+                        'marker': 'v'},
+                    edge_kwargs={
+                        'linewidth': 4})
+
+    # masked array support
+    masked_adjacency_matrix = np.ma.masked_array(
+        adjacency_matrix, np.abs(adjacency_matrix) < 0.5)
+    plot_connectome(masked_adjacency_matrix, node_coords,
+                    **kwargs)
+
+    # sparse matrix support
+    sparse_adjacency_matrix = sparse.coo_matrix(adjacency_matrix)
+    plot_connectome(sparse_adjacency_matrix, node_coords,
+                    **kwargs)
+
+
+def test_plot_connectome_exceptions():
+    import pylab as pl
+    pl.switch_backend('template')
+    node_coords = np.arange(2 * 3).reshape((2, 3))
+
+    # adjacency_matrix is not symmetric
+    non_symmetric_adjacency_matrix = np.array([[1., 2],
+                                               [0.4, 1.]])
+    assert_raises_regexp(ValueError,
+                         'should be symmetric',
+                         plot_connectome,
+                         non_symmetric_adjacency_matrix, node_coords)
+
+    adjacency_matrix = np.array([[1., 2.],
+                                 [2., 1.]])
+    # adjacency_matrix mask is not symmetric
+    masked_adjacency_matrix = np.ma.masked_array(
+        adjacency_matrix, [[False, True], [False, False]])
+
+    assert_raises_regexp(ValueError,
+                         'non symmetric mask',
+                         plot_connectome,
+                         masked_adjacency_matrix, node_coords)
+
+    # edges threshold is neither a number nor a string
+    assert_raises_regexp(TypeError,
+                         'should be either a number or a string',
+                         plot_connectome,
+                         adjacency_matrix, node_coords,
+                         edge_threshold=object())
+
+    # wrong shapes for node_coords or adjacency_matrix
+    assert_raises_regexp(ValueError,
+                         r'supposed to have shape \(n, n\).+\(1, 2\)',
+                         plot_connectome, adjacency_matrix[:1, :],
+                         node_coords)
+
+    assert_raises_regexp(ValueError, r'shape \(2, 3\).+\(2,\)',
+                         plot_connectome, adjacency_matrix, node_coords[:, 2])
+
+    wrong_adjacency_matrix = np.zeros((3, 3))
+    assert_raises_regexp(ValueError, r'Shape mismatch.+\(3, 3\).+\(2, 3\)',
+                         plot_connectome,
+                         wrong_adjacency_matrix, node_coords)
+
+    # a few not correctly formatted strings for 'edge_threshold'
+    wrong_edge_thresholds = ['0.1', '10', '10.2.3%', 'asdf%']
+    for wrong_edge_threshold in wrong_edge_thresholds:
+        assert_raises_regexp(ValueError,
+                             'should be a number followed by the percent sign',
+                             plot_connectome,
+                             adjacency_matrix, node_coords,
+                             edge_threshold=wrong_edge_threshold)
+
+    # specifying node sizes via node_kwargs
+    assert_raises_regexp(ValueError,
+                         "Please use 'node_size' and not 'node_kwargs'",
+                         plot_connectome,
+                         adjacency_matrix, node_coords,
+                         node_kwargs={'s': 50})
+
+    # specifying node colors via node_kwargs
+    assert_raises_regexp(ValueError,
+                         "Please use 'node_color' and not 'node_kwargs'",
+                         plot_connectome,
+                         adjacency_matrix, node_coords,
+                         node_kwargs={'c': 'blue'})
['nilearn/plotting/tests/test_img_plotting.py', 'doc/index.rst', 'doc/data_analysis/functional_connectomes.rst', 'doc/building_blocks/plotting.rst', 'examples/connectivity/plot_adhd_covariance.py', 'nilearn/plotting/img_plotting.py', 'nilearn/plotting/displays.py', 'doc/themes/nilearn/static/nature.css_t', 'nilearn/plotting/__init__.py']