I have histogram subplots that present only the amount of "0" and "1" values. I don't understand why my "1" values bar is in x-value "0.9", instead of "1"?
Here is the code I'm using:
fig, axes = plt.subplots(nrows=7, ncols=4, figsize=(25, 40), tight_layout=True)
for ax, i in zip(axes.ravel(), IND):
ax.hist(df.loc[df.RESP == 1, i].values, color='r')
ax.hist(df.loc[df.RESP == 0, i].values, color='b')
Where df
is DataFrame, IND
is list of DataFrame columns, RESP
as well as the other columns in IND
take only "0" and "1" values. The first three plots are shown below: