python plot bins not lining up with axis

Solutions on MaxInterview for python plot bins not lining up with axis by the best coders in the world

registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "python plot bins not lining up with axis"
Ida
18 Oct 2020
1# Basic syntax for left-aligned bins:
2plt.hist(data, bins=range(number)) 
3
4# Basic syntax for center-aligned bins:
5plt.hist(data, bins=np.arange(number)-0.5)