In [1]:
%matplotlib inline
from ggplot import *
import pandas as pd
import numpy as np
In [2]:
df = pd.DataFrame(dict(
x=np.random.normal(0, 1, 1000),
y=np.random.normal(0, 1, 1000),
w=np.random.uniform(-1, 1, 1000)
))
df.head()
Out[2]:
In [3]:
ggplot(df, aes(x='x', y='y', fill='w')) + geom_tile()
Out[3]:
In [4]:
ggplot(df, aes(x='x', y='y', fill='w')) + geom_bin2d()
Out[4]:
In [5]:
ggplot(df, aes(x='x', y='y', fill='w')) + geom_tile(ybins=5)
Out[5]:
In [7]:
ggplot(df, aes(x='x', y='y', fill='w')) + geom_tile(xbins=8, ybins=10)
Out[7]:
In [ ]: