from matplotlib import cm
import matplotlib.pyplot as plt
x = [1, 2, 4]
y = [11, 12, 8]
for i in range(0, len(x)):
    plt.bar(x[i], y[i], color=cm.jet(1.0 * i / len(x)))
plt.show()
How do I make bar plots automatically cycle across different colors?