I have an array: [0,0,0,0,0,1,1,1,1,1,0,0,0,1,1,1] (16 long) How can I create density histogram with, for instance bins=4 to see where there appears to be most 1:s? This histogram would for instance be very tall in the middle part, and raise at the end a little (most 1:s in the beginning and the end). I have this:
plt.hist([0,0,0,0,0,1,1,1,1,1,0,0,0,1,1,1], bins=4)
This is what i get. This histogram just presents that it's as many 1:s as 0:s.
How can I later create a graph (line) to show me the average raise and fall och the histogram?