In [1]:
%matplotlib inline
from ggplot import *
In [2]:
ggplot(diamonds, aes(x='price')) + \
geom_histogram() + \
facet_wrap("cut")
Out[2]:
In [3]:
ggplot(diamonds, aes(x='price')) + \
geom_histogram() + \
facet_wrap("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_wrap("individual")
Out[5]:
In [6]:
ggplot(chopsticks, aes(x='chopstick_length', y='food_pinching_effeciency')) + \
geom_point() + \
facet_wrap("individual", nrow=10)
Out[6]:
In [7]:
ggplot(chopsticks, aes(x='chopstick_length', y='food_pinching_effeciency')) + \
geom_point() + \
facet_wrap("individual", ncol=10)
Out[7]:
In [8]:
ggplot(chopsticks, aes(x='chopstick_length', y='food_pinching_effeciency')) + \
geom_point() + \
geom_line() + \
facet_wrap("individual")
Out[8]:
In [9]:
ggplot(chopsticks, aes(x='chopstick_length', y='food_pinching_effeciency')) + \
geom_point() + \
geom_line() + \
scale_x_continuous(breaks=[150, 250, 350]) + \
facet_wrap("individual")
Out[9]:
In [ ]: