问题
this is my code:
import numpy as np
import matplotlib.pyplot as plt
data = np.genfromtxt("C:\\Users\\pearl\\Downloads\\Age group.csv",
delimiter=',',
names=True, dtype=('U7','U40','U13',int))
x= ['15-19','20-24', '25-29','30-34','35-39','40-44']
y = data[data['birth_type'] == 'Single Birth']['total_number_of_mother']
plt.hist(x,y)
plt.show()
However, I am getting a value error saying bins
must increase monotonically. May I get some help?
来源:https://stackoverflow.com/questions/65263726/histogram-bins-must-increase-monotonically-matplotlib