What was the default color palette for images in the marine version of version 0.2?

What I immediately liked seabornwas the fact that he set the color palette for Matplotlib default images ( imshow, pcolormesh, contourf...) to very good, which I had not seen before (black-blue-green-brown-pink-Violet white):

plt.contourf(np.random.random((20,20)))

Default contourf plot under seaborn v.  0.2.1

But when I upgraded the package from version 0.21 to 0.3, this default changed a few shades of gray:

Default contourf plot under seaborn v.  0.3

What is the default color palette from v. 0.2.1 and how to return it?

+4
source share
2 answers

0.2.1 - Dave Green 'cubehelix', 0.3

import seaborn as sns
sns.set(rc={'image.cmap': 'cubehelix'})

" ", , :

img = plt.contourf(np.random.random((20,20)))
print(img.cmap.name)

, . Matplotlib sample matplotlibrc .

+6

j08lue , , , , , , lots . , , , .

, (?) matplotlib, colormap, cmap, .. plt.contourf(x, y, z, cmap="cubehelix") .

+6

Source: https://habr.com/ru/post/1533356/


All Articles