Home > Software design >  How can remove the gaps between bars?
How can remove the gaps between bars?

Time:09-28

The code underneath works but my problem is that it prints spaces in between the bars in the histogram and I want zero space in between each bin. Any suggestion is appreciated - appreciation!

sns.histplot(stat='frequency',data=df, x="Water",color = "red", bins=10,
             alpha = 0.3, kde = True, line_kws = {'color':'red','linestyle': 'dashed'})

enter image description here

I want something like the below plot.

enter image description here

CodePudding user response:

Using edgecolor, which is passed through to enter image description here

Or if you want an edge, then:

edgecolor='red'

enter image description here

  • Related