In [2]:
from ggplot import *
import pandas as pd
import numpy as np
?ggplot
In [3]:
# ?diamonds
diamonds.head() # similar for data sets 'meat', 'mtcars', and 'pageviews'
Out[3]:
In [4]:
type(diamonds)
Out[4]:
In [5]:
?ggplot
In [6]:
p = ggplot(aes(x = 'carat', y = 'price'), data = diamonds)
p
Out[6]:
In [7]:
p1 = p + geom_point()
p1
Out[7]:
In [8]:
p2 = p1 + facet_wrap("cut")
p2
Out[8]:
In [9]:
p3 = p2 + theme_bw()
p3
Out[9]: