In [1]:
%matplotlib inline
from ggplot import *

scale_color_funfetti

scale_color_funfetti applies color palettes to discrete color variables in your ggplots. It has 1 parameter:

  • type - type of palette to use ('sprinkles', 'confetti')

In [2]:
ggplot(mtcars, aes(x='wt', y='mpg', color='factor(cyl)')) + \
    geom_point(size=100)


Out[2]:
<ggplot: (284507057)>

In [3]:
ggplot(mtcars, aes(x='wt', y='mpg', color='factor(cyl)')) + \
    geom_point(size=100) + \
    scale_color_funfetti()


Out[3]:
<ggplot: (285369021)>

In [4]:
ggplot(mtcars, aes(x='wt', y='mpg', color='factor(cyl)')) + \
    geom_point(size=100) + \
    scale_color_funfetti(type='confetti')


Out[4]:
<ggplot: (285390621)>

In [5]:
ggplot(mtcars, aes(x='wt', y='mpg', color='factor(cyl)')) + \
    geom_point(size=100) + \
    scale_color_funfetti(type='sprinkles')


Out[5]:
<ggplot: (284933357)>

In [6]:
ggplot(pigeons, aes(x='pos', y='speed', color='breeder')) + \
    geom_point(size=100) + \
    scale_color_funfetti(type='sprinkles')


Out[6]:
<ggplot: (285244461)>

In [ ]: