Python Matplotlib Histogram Color

Python Matplotlib Histogram Color

The reason for the histogram to look black is that the bars surrounding lines (which are black) take most of the space.

Options would be to get rid of the edges by setting the linewidth to zero:

plt.hist(data, color = skyblue, lw=0)

and/or to set the edgecolor to the same color as the bars itself

plt.hist(data, color = skyblue, ec=skyblue)

Python Matplotlib Histogram Color

Leave a Reply

Your email address will not be published. Required fields are marked *