Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python - change the bin size of an histogram+

x = np.random.randn(1000)      # Generate random numbers
plt.hist(x, bins=20)           # Select bin size
plt.hist(x, bins=range(-4, 5)) # Select range
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #change #bin #size
ADD COMMENT
Topic
Name
7+8 =