http://blog.yhathq.com/posts/ggplot-for-python.html
In [1]:
%run talktools
%matplotlib inline
Now you can create matplotlib plots using R-like syntax:
In [2]:
from ggplot import *
ggplot(meat, aes('date','beef')) + \
geom_line(color='black') + \
scale_x_date(breaks=date_breaks('7 years'), labels='%b %Y') + \
scale_y_continuous(labels='comma')
Out[2]:
ggplot also natively handles Pandas DataFrames:
In [3]:
import pandas as pd
meat_lng = pd.melt(meat, id_vars=['date'])
p = ggplot(aes(x='date', y='value'), data=meat_lng)
p + geom_point() + \
stat_smooth(colour="red") + \
facet_wrap("variable")
Out[3]:
Former R users who have switched to Python: this may be what you're looking for!
Read more at http://blog.yhathq.com/posts/ggplot-for-python.html