ax.bar returns the Container performers; each "artist" is a Rectangle with the set_linewidth and set_edgecolor .
To change the settings of, say, the second column in mybar , you can do this:
mybar[1].set_linewidth(4) mybar[1].set_edgecolor('r')
Here's a script that shows how this can be used to change the width of the stack line:
import numpy as np import matplotlib.pyplot as plt x = np.array([1,2,3]) y1 = np.array([3,2.5,1]) y2 = np.array([4,3,2]) y3 = np.array([1,4,1]) width = 0.5 handles = [] b1 = plt.bar(x, y1, color='#2040D0', width=width, linewidth=0) handles.append(b1) b2 = plt.bar(x, y2, bottom=y1, color='#60A0D0', width=width, linewidth=0) handles.append(b2) b3 = plt.bar(x, y3, bottom=y1+y2, color='#A0D0D0', width=width, linewidth=0) handles.append(b3)
This script creates the following histogram:

source share