I want to change the color of this mosaic plot to make it printable in black in white but can't find a way to change this parameter
from statsmodels.graphics.mosaicplot import mosaic
import matplotlib.pyplot as plt
import pandas
x = ['yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes']
y = ['yes', 'yes', 'yes', 'yes', 'no', 'no', 'no']
data = pandas.DataFrame({'x': x, 'y': y})
mosaic(data, ['x', 'y'])
plt.savefig("mosaicplot.pdf", figsize=[10,5])
plt.show()
Here is what I actually have : I saw I could change the color with mosaic(properties) on this link : http://www.statsmodels.org/stable/generated/statsmodels.graphics.mosaicplot.mosaic.html
but I can only give 2 different colors and I need a different color for each plot, like this: