Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python plot bins not lining up with axis

# Basic syntax for left-aligned bins:
plt.hist(data, bins=range(number)) 

# Basic syntax for center-aligned bins:
plt.hist(data, bins=np.arange(number)-0.5)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #plot #bins #lining #axis
ADD COMMENT
Topic
Name
1+6 =