Python

Matplotlib Histograms

grace21110 2023. 11. 10. 08:01
반응형

A histogram is a graph showing frequency districutions. We use the hist() function to create histogram. 

It will use an array of numbers to create historgram.

 

Example 

import matplotlib.pyplot as plt 
import numpy as np 

x = np.random.normal(50, 10, 250)

plt.hist(x)
plt.show()

Result