seaborn icon indicating copy to clipboard operation
seaborn copied to clipboard

Consider providing exact color brewer palettes with sns.color_palette

Open shoyer opened this issue 8 years ago • 1 comments

Seaborn currently uses matplotlib's color maps to create discrete color palettes.

For color brewer palettes, these are close but not an exact match for the original, discrete colormaps. I find that Seaborn is usually a slightly washed out version of the originals.

For one concrete example, compare the 6 color RdYlGn from Seaborn (left) vs the original (from Palettable, right):

screen shot 2015-10-07 at 7 20 53 pm screen shot 2015-10-07 at 7 20 44 pm

It would be nice to use these exact colormaps, possibly by using palettable (either as a dependency or repackaged into Seaborn's).

shoyer avatar Oct 08 '15 02:10 shoyer

Sure that seems reasonable. The current approach just uses the continuous colormaps offered by matplotlib with a n approach that tries to keep the edges away from extreme values, which probably operates slightly differently than how the original maps were made. If it's simple to figure out how the smaller palettes are made from the continuous map programmatically, that might be best.

mwaskom avatar Oct 09 '15 18:10 mwaskom