Here\'s a minimal example to generate a plot which illustrates my question:
import matplotlib.pylab as plt
import matplotlib.mpl as mpl
import numpy as np
You just need to find out how to access those lines, let try:
>>> CB.ax.get_children()
[, , , , , , , , , , ]
Alright, take a guess, I bet the 5th item is a list of the divider lines. We are looking for some .line objects and there are two. The first one (3rd item) actually is the edge of the entire color bar (if I remember correctly). So I will go for the next .line object.
Now let's try to modified it in a few ways:
>>> len(lines1[4].get_linewidths())
11 #how many item are there? 11 lines
>>> lines1[4].set_color(['r']*11) #set them all to red, in this example we actually want to have the color stay the same, this is just for a demonstration.
>>> lines1[4].set_linewidths([2]*11) #set them all to have linewidth of 2.
the result