[Matplotlib-users] Displaying raster colormap in a colorbar

Bruno Pagani bruno.pagani at astrophysics.eu
Fri Aug 3 17:53:21 EDT 2018

Le 03/08/2018 à 23:48, Matthew Bradley a écrit :
> Nice solution, I wasn't thinking in those sorts of terms before but I
> think that is the way to go!
> Thanks!
> On Fri, Aug 3, 2018 at 3:39 PM, Benjamin Root <ben.v.root at gmail.com
> <mailto:ben.v.root at gmail.com>> wrote:
>     Well, why are you creating an RGB array?. Why not just pass the
>     data into imshow() and give it vmin/vmax and the colormap that
>     you'd like to use?

What you want is likely a colormap like `diverging_gwr` or
`diverging_gkr` from colorcet (https://colorcet.pyviz.org/). I mean, if
you want to keep those colors. ;)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20180803/ef890cf4/attachment.html>

More information about the Matplotlib-users mailing list