Issue
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'})
I want something like the below plot.
Solution
Using edgecolor
, which is passed through to Axes.bar
. As an example:
import seaborn as sns
tips = sns.load_dataset('tips')
sns.histplot(stat='frequency', data=tips, x='total_bill', color='red',
kde=True, alpha=0.3, edgecolor=None,
line_kws = {'color':'red','linestyle': 'dashed'})
Or if you want an edge, then:
edgecolor='red'
Answered By - BigBen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.