In [1]:
%matplotlib inline
from ggplot import *
import pandas as pd

scale_fill_yhat


In [2]:
ggplot(mtcars, aes(x='factor(cyl)', fill='factor(vs)')) + geom_bar() + scale_fill_yhat()


Out[2]:
<ggplot: (284480929)>

In [3]:
ggplot(mtcars, aes(x='factor(cyl)', fill='factor(gear)')) + geom_bar() + scale_fill_yhat()


Out[3]:
<ggplot: (285321285)>

In [5]:
ggplot(diamonds, aes(x='clarity', fill='cut')) + geom_bar() + scale_fill_yhat()


Out[5]:
<ggplot: (284886673)>

In [6]:
ggplot(diamonds, aes(x='pd.cut(price, nbins=10)', fill='cut')) + geom_bar() + scale_fill_yhat()


Out[6]:
<ggplot: (285929557)>

In [ ]: