I have binary image (only 2 color, black and white), 
I want to create histogram of the image. I have tried with these code:
import cv2
import numpy as np
from matplotlib import pyplot as plt
img = cv2.imread('bin_003.png')
color = ('b','g','r')
for i,col in enumerate(color):
histr = cv2.calcHist([img],[i],None,[256],[0,256])
plt.plot(histr,color = col)
plt.xlim([0,256])
plt.show()
But the code shows
instead of showing only 0 and 1 at the x axis.
