In [1]:
import matplotlib.pyplot as plt
import matplotlib as mpl
import matplotlib.colors as clr

#create color bar
norm = mpl.colors.Normalize(vmin=0, vmax=1)
fig = plt.figure(figsize=(8, 3))
ax1 = fig.add_axes([0.05, 0.80, 0.9, 0.15])
cmap = clr.LinearSegmentedColormap.from_list('mycmap', [(0, 'white'), (1, '#7D0541')])
cb1 = mpl.colorbar.ColorbarBase(ax1, cmap=cmap, norm=norm, orientation='horizontal')

#plot color bar
plt.show()



In [ ]: