Seaborn visualize ข้อมูล มี theme และ high-level interface ควบคุมรูปแบบข้อมูลและการกรอง Hexagonal binning ใช้วิเคราะห์ bivariate data เมื่อข้อมูล sparse (กระจายไม่สม่ำเสมอ) scatter plot ตรงไปตรงมาอาจจับจุดข้อมูลไม่ได้ ใช้ hexagonal binning แทน
ตัวอย่าง
import pandas as pd
import seaborn as sb
from matplotlib import pyplot as plt
my_df = sb.load_dataset('iris')
sb.jointplot(x='petal_length', y='petal_width', data=my_df, kind='hex')
plt.show()
ผลลัพธ์

คำอธิบาย
- นำเข้าแพ็กเกจ
- โหลดข้อมูล 'iris' จาก seaborn
- เก็บใน DataFrame
- ใช้ 'jointplot' kind='hex' (hexagonal binning)
- ระบุ x, y, data
- แสดงผล
Hexbin plot แบ่งพื้นที่เป็นหกเหลี่ยม นับจำนวนจุดในแต่ละหกเหลี่ยม สีเข้ม = จำนวนมาก เหมาะกับข้อมูลหนาแน่น