import pandas as pd
import numpy as np
n = 10000
df=pd.DataFrame({'x': np.random.randn(n),
'y': np.random.randn(n)})
ax=df.plot.hexbin(x='x',y='y',gridsize=20)
df.plot.hexbin(x='x',y='y',gridsize=20,figsize=(6,3))
df.plot.hexbin(x='x',y='y',gridsize=20,fontsize=20)
df.plot.hexbin(x='x',y='y',gridsize=20,title='hexbin Plot',color=[(.9,.2,.6)])
df.plot.hexbin(x='x',y='y',gridsize=20,title='grid=True',grid=True)
df.plot.hexbin(x='x',y='y',gridsize=20,title='loglog=True',loglog=True)
Pandas plot plot.barh()
Author
🎥 Join me live on YouTubePassionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.