In [1]:
%matplotlib inline
from ggplot import *
import pandas as pd
In [2]:
ggplot(diamonds, aes(x='price')) + \
geom_histogram() + \
facet_grid("cut")
Out[2]:
In [3]:
ggplot(diamonds, aes(x='price')) + \
geom_histogram() + \
facet_grid("cut", "clarity")
Out[3]:
In [4]:
chopsticks.head()
Out[4]:
In [5]:
ggplot(chopsticks, aes(x='chopstick_length', y='food_pinching_effeciency')) + \
geom_point() + \
facet_grid("individual")
Out[5]:
In [6]:
meat_lng = pd.melt(meat[['date', 'beef', 'pork', 'veal']], id_vars=['date'])
ggplot(meat_lng, aes(x='value')) + \
geom_histogram() + \
facet_grid("variable")
Out[6]:
In [7]:
ggplot(meat_lng, aes(x='value')) + \
geom_histogram() + \
facet_grid(None, "variable")
Out[7]:
In [8]:
ggplot(meat_lng, aes(x='value')) + \
geom_density() + \
facet_grid(None, "variable")
Out[8]:
In [9]:
ggplot(meat_lng, aes(x='value')) + \
geom_density() + \
facet_grid("variable")
Out[9]:
In [ ]: