Adding axis bar_label() to sns.barplot BarContainer with error bars doesn't put labels above error bars
See original GitHub issueIn matplotlib when you call ax.bar_label(bar, labels=[...])
on a BarContainer
which has error bars it will put the labels correctly above the error bars. But in seaborn it’s putting it above the bars but not the error bars.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to add value labels on a bar chart? - python
Firstly freq_series.plot returns an axis not a figure so to make my answer a little more clear I've changed your given code to...
Read more >Axes.bar_label
Label a bar plot. Adds labels to bars in the given BarContainer . You may need to adjust the axis limits to fit...
Read more >[Bug]: bar_label overlaps bars when y-axis is inverted · ...
In this case, the label will overlap the borders and could significantly hinder the display. I think that the alignment should be handled ......
Read more >How To Annotate Barplot with bar_label() in Matplotlib
Here we add bar height as bar labels to make it easy to read the barplot. plt.figure(figsize=(8, 6)) splot=sns.barplot(x="continent",y="lifeExp" ...
Read more >How to obtain a correct legend for a barplot when the first ...
When I add a legend, it always takes the colors from the first bars. ... plt.bar(..., label='label') the label gets assigned to the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you search on stackoverflow you will find approximately one thousand questions asking how to put labels over a bar plot.
Thank you, for others who come here with the same problem, I found good examples below, where they used seaborn
barplot
and matplotlibannotate
. Works great and you can put the labels as high or low as you want.https://www.geeksforgeeks.org/how-to-annotate-bars-in-barplot-with-matplotlib-in-python/