%matplotlib inline
from ggplot import *
import pandas as pd
scale_y_log
¶scale_y_log
applies a logarithmic scale to your y-axis. Its parameters are:
base
- base value logarithm. defaults to 10ggplot(diamonds, aes(x='carat', y='price')) + \
geom_point() + \
scale_y_log()
pageviews['hour'] = pageviews.date_hour.apply(lambda x: x.hour)
ggplot(pageviews, aes(x='hour', weight='pageviews')) + \
geom_bar()
ggplot(pageviews, aes(x='hour', weight='pageviews')) + \
geom_bar() + \
scale_y_log()