To summarize the answers given in matplotlib bar graph black - how do I remove bar borders
There are two main ways to remove the white edgecolor: 1. Changing linewidth 2. Changing edgecolor
Mentioned in Docs of bar plot as
linewidth: float or array-like, optional Width of the bar edge(s). If 0, don't draw edges.
bar(. . . , linewidth=0)
bar(. . . , edgecolor="b")
bar(. . . , edgecolor="none")
Origin: The default edgecolor is black but for example setting seaborn style to whitegrid once will result in the described Problem.
Example to test:
import matplotlib.pyplot as plt
import seaborn as sns
#sns.set_style("whitegrid") # once called edgecolor will be white
fig, axs = plt.subplots(1, 4, figsize=(8, 3))
# Bars with hatching default edgecolor
axs[0].bar([1, 1.5, 2], [3, 5, 2], color='b', hatch='//')
axs[0].set_title('default')
# Bars with hatching and edgecolor="none" (hatching disappears)
axs[1].bar([1, 1.5, 2], [3, 5, 2], hatch='//', edgecolor="none", color='b')
axs[1].set_title('edgecolor="none"')
# Bars with hatching and edgecolor="b" (hatching disappears)
axs[2].bar([1, 1.5, 2], [3, 5, 2], hatch='//', edgecolor="b", color='b')
axs[2].set_title('edgecolor="b"')
# Bars with hatching and linewidth=0 (hatching remains)
axs[3].bar([1, 1.5, 2], [3, 5, 2], hatch='//', linewidth=0, color='b')
axs[3].set_title('linewidth=0')
plt.show()