In [1]:
%matplotlib inline
from ggplot import *
In [2]:
ggplot(mtcars, aes(x='wt', y='mpg', color='factor(cyl)')) + geom_point()
Out[2]:
In [3]:
ggplot(mtcars, aes(x='wt', y='mpg', color='factor(cyl)')) + \
geom_point() + \
scale_color_brewer()
Out[3]:
In [4]:
ggplot(mtcars, aes(x='wt', y='mpg', color='factor(cyl)')) + \
geom_point() + \
scale_color_brewer(type='div')
Out[4]:
In [5]:
ggplot(mtcars, aes(x='wt', y='mpg', color='factor(cyl)')) + \
geom_point() + \
scale_color_brewer(type='div', palette=4)
Out[5]:
In [6]:
ggplot(mtcars, aes(x='wt', y='mpg', color='factor(cyl)')) + \
geom_point() + \
scale_color_brewer(type='seq', palette=2)
Out[6]:
In [7]:
ggplot(mtcars, aes(x='wt', y='mpg', color='factor(cyl)')) + \
geom_point() + \
scale_color_brewer(type='qual')
Out[7]:
In [ ]: