I have two data list data value(each 100 numbers) d1 = [0.5, 0.6, 0.45, ........], d2= [0.45,0.65, ........]. I want to plot the two hist with two list data, like the following figure! How to plot it with matplotlib, Thanks! my code is following:
def plot_data(d1, d2):
fig, ax = plt.subplots()
ax.hist(d1, 100, 50, ec='red', fc='none', lw=1.5, histtype='step', label='n-gram')
ax.hist(d2, 100, 50, ec='green', fc='none', lw=1.5, histtype='step', label='ensemble')
ax.legend(loc='upper left')
plt.show()
but there is error:
mn, mx = [mi + 0.0 for mi in range]
TypeError: 'int' object is not utterable

