How to Plot Histogram in Seaborn

Machine Learning courses with 100+ Real-time projects Start Now!!

Program 1

Seaborn Dataset

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns


df_tips=pd.read_csv("D://scikit_data/Billing/tips.csv")


df_tips.head()


sns.distplot(df_tips['total_bill'],bins=70)


sns.distplot(df_tips['total_bill'],kde=False)


sns.distplot(df_tips['total_bill'],hist=False)


plt.xlabel("Total Bill")
plt.ylabel("Count")
plt.title("Billing System")
sns.distplot(df_tips['total_bill'],hist=False,xlabel="Total Bill")


sns.distplot(df_tips['total_bill'])


sns.distplot(df_tips['total_bill'],color='r')


sns.distplot(df_tips['total_bill'],rug=True,color='r')



from scipy.stats import norm
sns.distplot(df_tips['total_bill'],fit=norm)


sns.distplot(df_tips['total_bill'],vertical=True)


sns.distplot(df_tips['total_bill'])


sns.distplot(df_tips["total_bill"],hist_kws={"color":"y"})


sns.distplot(df_tips["total_bill"],color='y')


sns.distplot(df_tips["total_bill"],hist_kws={"color":"y","edgecolor":"red","linewidth":2,'linestyle':':'})


sns.distplot(df_tips["total_bill"],kde_kws={"color":"r","linewidth":2,'linestyle':':'})

Did you like our efforts? If Yes, please give DataFlair 5 Stars on Google

courses

DataFlair Team

DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.

Leave a Reply

Your email address will not be published. Required fields are marked *