matplotlib bar graph black - how do I remove bar borders

PythonGraphMatplotlibBorder

Python Problem Overview


I'm using pyplot.bar but I'm plotting so many points that the color of the bars is always black. This is because the borders of the bars are black and there are so many of them that they are all squished together so that all you see is the borders (black). Is there a way to remove the bar borders so that I can see the intended color?

Python Solutions


Solution 1 - Python

Set the edgecolor to "none": bar(..., edgecolor = "none")

Solution 2 - Python

Another option is to set edgecolor to be the intended color in your call to bar:

# If your intended color is blue, this will work:
bar(. . . , edgecolor='b')

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser1893354View Question on Stackoverflow
Solution 1 - PythonRobbertView Answer on Stackoverflow
Solution 2 - PythondblissView Answer on Stackoverflow