how to express statistical data in colors

hi,

I'd like to present data in a colorbar-style graphic.

The data to plot is in this form: [1,2,4,4,4.1,4.3,6,7].
The colorbar with this data should show at the begin the color with low
intensity. In more or less the middle of the colorbar the intensity
should be much more because there are a lot values around 4-4.3 and at
the end the intensity should be low again. I imagine low to middle
intensity to show with the color blue and high intensity with nearly by
or with the color black.

With colobar-style I mean this:
http://matplotlib.org/examples/api/colorbar_only.html (the first bar).

I assume matplotlib already provides such a method I cant find.. so any
input is welcome:)

thank you