In [1]:
%matplotlib inline
from ggplot import *
In [2]:
ggplot(diamonds, aes(x='carat', y='price')) + \
geom_point() + \
scale_y_continuous("Price ($)")
Out[2]:
In [3]:
ggplot(diamonds, aes(x='carat', y='price')) + \
geom_point() + \
scale_y_continuous("Price ($)", breaks=[0, 7500, 15000, 25000])
Out[3]:
In [4]:
ggplot(diamonds, aes(x='carat', y='price')) + \
geom_point() + \
scale_y_continuous("Price ($)", breaks=[0, 7500, 15000, 25000], labels=["Cheap", "Not So Cheap", "Costly", "Dumb"])
Out[4]:
In [ ]: