Ch17 Figure6


In [3]:
%matplotlib inline
sns.set_style("white")
cm = sns.color_palette('Blues', 2)

f, ax = plt.subplots(1,1, figsize=(6,8))
ax.bar(left=np.arange(2), height=[2,10])
ax2 = ax.twinx()

ax2.bar(left = np.arange(4), height=[0,0,0,1010], color = cm[0]);
ax2.bar(left = np.arange(4), height=[0,0,0,1000], color = cm[1]);
ax.set_xticks(np.arange(4)+.2);
ax.set_xticklabels(['red shoes sales \n before promotion', 'red shoes sales \n increase 500% after promotion', '', 'only 1% increase on \n total sales'], rotation=45);

f.tight_layout()
f.savefig('svg_output/ch17_fig6.svg', format='svg')


red shoes sales might increase 500% after promotion, however, assume the total sales is about 1000 per day, that's only 1% increase.