Why not change it to len(histograms) + 2 ? This way it will be always the last (+1 for error band).