In [1]:
from ggplot import *
%matplotlib inline
In [2]:
ggplot(mtcars, aes(x='wt', y='mpg')) + geom_point()
Out[2]:
In [3]:
ggplot(mtcars, aes(x='wt', y='mpg', color='cyl')) + geom_point()
Out[3]:
In [4]:
ggplot(mtcars, aes(x='wt', y='mpg', shape='factor(cyl)')) + geom_point()
Out[4]:
In [5]:
ggplot(diamonds, aes(x='carat', y='price')) + geom_point()
Out[5]:
In [6]:
ggplot(diamonds, aes(x='carat', y='price')) + geom_point(color='steelblue')
Out[6]:
In [7]:
ggplot(diamonds, aes(x='carat', y='price')) + geom_point(alpha=1/100.)
Out[7]:
In [8]:
ggplot(diamonds, aes(x='carat', y='price')) + geom_point(alpha=1/100.) + stat_smooth()
Out[8]:
In [10]:
ggplot(mpg, aes(x='year', y='hwy', color='class')) + geom_point()
Out[10]:
In [12]:
ggplot(mpg, aes(x='cty', y='hwy', color='class')) + geom_point()
Out[12]:
In [ ]:
ggplot(mpg, aes(x='cty', y='hwy', color='class')) + geom_point()