- #20 Basic Histogram | Seaborn
- #20 Control bins on seaborn histogram
With Seaborn, histograms are made using the distplot function. You can call the function with default values (left), what already gives a nice chart. Do not forget to play with the number of bins using the ‘bins’ argument. It is important to do so: a pattern can be hidden under a bar. Here is the code:
# Import library and dataset import seaborn as sns df = sns.load_dataset('iris') # Make default histogram of sepal length sns.distplot( df["sepal_length"] ) #sns.plt.show() # Control the number of bins sns.distplot( df["sepal_length"], bins=20 ) #sns.plt.show()
Hi
Is it possible in Seaborn Histogram to add inset on the plot ?
(inset example: n, mean, median, stddev, percentile, etc…)
Pingback: Python&R: インストールなしではじめるプログラミング4: ヒストグラム | Think it aloud
Pingback: Python&R: インストールなしではじめるプログラミング4: ヒストグラム ver.2 | Think it aloud
Pingback: Python&R: インストールなしではじめるプログラミング4: ヒストグラム ver.3 | Think it aloud
Pingback: Python&R: インストールなしではじめるプログラミング4: ヒストグラム ver.4 | Think it aloud