In [2]:
from ggplot import *
%matplotlib inline
In [3]:
ggplot(aes(x='price'), data=diamonds) + stat_density()
Out[3]:
In [4]:
ggplot(aes(x='price', color='clarity'), data=diamonds) + stat_density()
Out[4]:
In [5]:
ggplot(aes(x='price', color='clarity', linetype='cut'), data=diamonds) + stat_density()
Out[5]:
In [6]:
ggplot(aes(x='price'), data=diamonds) + stat_density() + facet_wrap('cut')
Out[6]:
In [7]:
ggplot(aes(x='price'), data=diamonds) + stat_density() + facet_wrap('cut', 'clarity')
Out[7]:
In [8]:
ggplot(aes(x='price'), data=diamonds) + stat_density() + facet_grid('cut', 'clarity')
Out[8]:
In [9]:
ggplot(aes(x='price'), data=diamonds) + stat_density() + scale_x_log()
Out[9]:
In [ ]: