In [1]:
from ggplot import *
%matplotlib inline
In [2]:
ggplot(mtcars, aes(x='wt', y='mpg')) + \
geom_point() + \
geom_vline(x=4.5)
Out[2]:
In [6]:
ggplot(mtcars, aes(x='wt', y='mpg')) + \
geom_point() + \
geom_vline(x=[2, 3, 4, 5])
Out[6]:
In [11]:
ggplot(mtcars, aes(x='wt', y='mpg', color='factor(cyl)')) + \
geom_point() + \
geom_vline(color='black', x=range(6))
Out[11]:
In [20]:
ggplot(diamonds, aes(x='carat', y='price')) + \
geom_point() + \
geom_vline(color='turquoise', x=range(7)) + \
facet_wrap("clarity")
Out[20]: