Histograms allow to visualize the distribution of a numeric variable for one or several groups. The values are split in bins, each bin is represented as a bar.
⏱ Quick start
Seaborn is definitely the best library to quickly build a histogram thanks to its
Note the importance of the
bins parameter: try several values to see which represents your data the best. 🔥
# library & dataset import seaborn as sns df = sns.load_dataset('iris') # Plot the histogram thanks to the distplot function sns.distplot( a=df["sepal_length"], hist=True, kde=False, rug=False )
Histogram charts with
Seaborn is a python library allowing to make better charts easily. It is well adapted to build histogram thanks to its
distplot function. The following charts will guide you through its usage, going from a very basic histogram to something much more customized.
violin function parameters→ see full doc
string→ color under the curve