Let's say I did 16 experiments replicated 3 times for a total of 48 measures. Here's an example of my dataframe and a snippet that replicates my problem:
import numpy as np import pandas as pd import matplotlib.pyplot as plt df = pd.DataFrame(np.abs(np.random.randn(48, 4)), columns=list("ABCD")) color_list = plt.cm.gnuplot(np.linspace(0,1,16)) df.A.plot.bar( figsize=(16,7), color=color_list) plt.axvline(15.5, c="black", lw=1) plt.axvline(31.5, c="black", lw=1) plt.plot() And here's the output of the graph:

So, the vertical lines represents each replica, there is 16 bars in each. My color list is also of length 16 so I would expect to have 3 times the same colors, but at 16 and 17, there is two black bars (which is the 0th color in the list) and at 32, there is this yellow bar that comes from the offset caused by the second black line at 17. Followed by 2 black lines again.
It looks like my color_list puts a 0 automatically when it starts for the second time.
Edit : My temporary solution was to create a list of length 48 that is the first list repeated 3 times:
lst=list(np.linspace(0,1,16)) liste = lst + lst + lst color_list = plt.cm.gnuplot(liste)
plt.figure(figsize=(16,7)) plt.bar(range(len(df.A)), df.A, color=color_list)but you will need to tweak the axis and a few other things.