from ggplot import *
from mpltools import style
style.use('ggplot')
meat_lng = pd.melt(meat[['date', 'beef', 'pork', 'broilers']], id_vars='date')
ggplot(aes(x='date', y='value', colour='variable'), data=meat_lng) + \
geom_point() + \
stat_smooth(color='red')
<ggplot: (18935826)>
ggplot(diamonds, aes('carat', 'price')) + \
geom_point(alpha=1/20.) + \
ylim(0, 20000)
<ggplot: (19008968)>
p = ggplot(aes(x='carat'), data=diamonds)
p + geom_hist() + ggtitle("Histogram of Diamond Carats") + labs("Carats", "Freq")
<ggplot: (19008488)>
ggplot(diamonds, aes(x='price', color='cut')) + \
geom_density()
<ggplot: (19365468)>
meat_lng = pd.melt(meat[['date', 'beef', 'broilers', 'pork']], id_vars=['date'])
p = ggplot(aes(x='value', colour='variable', fill=True, alpha=0.3), data=meat_lng)
p + geom_density()
<ggplot: (19044300)>
p = ggplot(mtcars, aes('factor(cyl)'))
p + geom_bar()
<ggplot: (18940473)>