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
Thanks for pointing this one out - I am not sure yet, to be honest, how to
handle a threshold of e.g. 4 when e.g. vmax=10 and vmin = 2. We just gray 2
to 4?

2014-11-27 11:27 GMT+01:00 eickenberg <notifications@github.com>:

> In nilearn/plotting/slicers.py:
>
> >          ticks = np.linspace(im.norm.vmin, im.norm.vmax, 5)
> > -        figure.colorbar(im, cax=self._colorbar_ax, ticks=ticks)
> > +        bounds = np.linspace(im.norm.vmin, im.norm.vmax, 100)
> > +        our_cmap = _cm.jet
> > +
> > +        if threshold != 1e-6:
> > +            # some colormap hacking
> > +            cmaplist = [our_cmap(i) for i in range(our_cmap.N)]
> > +            rng = float(im.norm.vmax + abs(im.norm.vmin))
>
> Could you motivate the abs in that line? That means that if the minimal
> value is positive, then the range will assume it was actually its negative
> symmetric.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nilearn/nilearn/pull/296/files#r20988126>.
>



-- 
Viele Grüße,
Danilo