barplot seaborn code example
Example 1: seaborn pairplot
>>> import seaborn as sns; sns.set(style="ticks", color_codes=True)
>>> iris = sns.load_dataset("iris")
>>> g = sns.pairplot(iris)
Example 2: how to overlap two barplots in seaborn
import matplotlib.pyplot as plt
import seaborn as sns
crashes = sns.load_dataset("car_crashes").sort_values("total", ascending=False)
txcahi = crashes[crashes['abbrev'].isin(['TX','CA','HI'])]
f, ax = plt.subplots(figsize=(10, 5))
plt.xticks(rotation=90, fontsize=10)
plt.bar(height="total", x="abbrev", data=crashes, label="Total", color="lightgray")
plt.bar(height="total", x="abbrev", data=txcahi, label="Total", color="red")
sns.despine(left=True, bottom=True)