0

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:

enter image description here

30114
  • 161
  • 1
  • 1
  • 14
  • Please show the code you used to generate these charts as a [minimal, complete, and verifiable example](http://stackoverflow.com/help/mcve). Without this information it's difficult to guess what is wrong. – iayork Oct 21 '15 at 19:01
  • I changed the original question. I hope it's clear now. Thanks in advance! – 30114 Oct 21 '15 at 19:10

0 Answers0