import matplotlib.pyplot as plt

import matplotlib.patheffects as PathEffects

import numpy as np

np.random.seed(2358)

fig = plt.figure()

# sime bar shadows

x = np.random.randn(1000)

n, bins, patches = plt.hist(x, bins=7)

shadow = PathEffects.withSimplePatchShadow(offset_xy=(10,-10), patch_alpha=0.8, shadow_rgbFace=(0.25,0.25,0.25))

for p in patches:

p.set_path_effects([shadow])

plt.show()