added thresholded colorbar

attemps to adress #231

Here is an example for threshold=5 of what it currently looks like:

![bildschirmfoto 2014-11-25 um 18 53 21](https://cloud.githubusercontent.com/assets/3907396/5191981/85c179e6-74f3-11e4-8def-b032366a3684.png)

Greetings from Berlin
I am for finishing this PR up first (just commited new changes) and get to
Michaels code dans un deuxième temps.

2014-12-11 15:03 GMT+01:00 Loïc Estève <notifications@github.com>:

> In nilearn/plotting/displays.py
> <https://github.com/nilearn/nilearn/pull/296#discussion-diff-21677276>:
>
> > @@ -401,8 +402,19 @@ def add_overlay(self, img, threshold=1e-6, colorbar=False, **kwargs):
> >
> >          ims = self._map_show(img, type='imshow', **kwargs)
> >
> > +        if threshold is not None:
> > +            if threshold < 0:
> > +                raise ValueError("The set threshold (%.2f) can't be negative"
> > +                                 % threshold)
> > +            if threshold > ims[0].norm.vmax:
> > +                raise ValueError('The set threshold (%.2f) is higher than '
> > +                                 'vmax (%.2f)' % (threshold, ims[0].norm.vmax))
> > +            if threshold > abs(ims[0].norm.vmax):
> > +                raise ValueError('The set threshold (%.2f) is lower than '
> > +                                 'vmin (%.2f)' % (threshold, ims[0].norm.vmin))
> > +
>
>  OK, but what should we do about the following use case (people do on SPM
> all the time): visualize dissymetric ranges of values: [th, +\infty]. This
> is because in many (most) neuroimaging studies, people are interested in
> A>B but do not care about B>A
>
> I would say that we should definitely add this feature but that this
> should be done outside of this PR.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nilearn/nilearn/pull/296/files#r21677276>.
>



-- 
Viele Grüße,
Danilo