In [1]:
%matplotlib inline
from ggplot import *
In [2]:
ggplot(diamonds, aes(x='carat', y='price')) + \
geom_point() + \
scale_x_continuous("Carat (1 = 200mg)")
Out[2]:
In [3]:
ggplot(diamonds, aes(x='carat', y='price')) + \
geom_point() + \
scale_x_continuous("Carat (1 = 200mg)", breaks=[0, 3, 6])
Out[3]:
In [4]:
ggplot(diamonds, aes(x='carat', y='price')) + \
geom_point() + \
scale_x_continuous("Carat (1 = 200mg)", breaks=[0, 3, 6], labels=["Small", "OK", "Impressive"])
Out[4]:
In [ ]: