In [1]:
%matplotlib inline
from ggplot import *
import pandas as pd
In [2]:
ggplot(mtcars, aes(x='factor(cyl)', fill='factor(vs)')) + geom_bar() + scale_fill_yhat()
Out[2]:
In [3]:
ggplot(mtcars, aes(x='factor(cyl)', fill='factor(gear)')) + geom_bar() + scale_fill_yhat()
Out[3]:
In [5]:
ggplot(diamonds, aes(x='clarity', fill='cut')) + geom_bar() + scale_fill_yhat()
Out[5]:
In [6]:
ggplot(diamonds, aes(x='pd.cut(price, nbins=10)', fill='cut')) + geom_bar() + scale_fill_yhat()
Out[6]:
In [ ]: