I'm trying to use a matplotlib.colormap object in conjunction with the pandas.plot function:
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.cm as cm
df = pd.DataFrame({'days':[172, 200, 400, 600]})
cmap = cm.get_cmap('RdYlGn')
df['days'].plot(kind='barh', colormap=cmap)
plt.show()
I know that I'm supposed to somehow tell the colormap the range of values it's being fed, but I can't figure out how to do that when using the pandas .plot() function as this plot() does not accept the vmin/vmax parameters for instance.