# How to put numbers on top of each bar in a bar chart?

**URL:** <https://discourse.julialang.org/t/how-to-put-numbers-on-top-of-each-bar-in-a-bar-chart/59743>\
**Category:** Visualization\
**Tags:** question\
**Created:** [April 21, 2021, 3:51pm UTC](https://discourse.julialang.org/t/how-to-put-numbers-on-top-of-each-bar-in-a-bar-chart/59743 "2021-04-21T15:51:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zxjroger](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zxjroger/32/11826_2.png) [@zxjroger](https://discourse.julialang.org/u/zxjroger)\
**Post date:** [April 21, 2021, 3:51pm UTC](https://discourse.julialang.org/t/how-to-put-numbers-on-top-of-each-bar-in-a-bar-chart/59743/1 "2021-04-21T15:51:46Z")

</div>

I tried to make a chart like this, but I couldn’t find a way to show the numbers on top of each bar.

 ![](https://global.discourse-cdn.com/julialang/original/3X/3/1/31489a766f013025115b035f5e1421ff07404fb7.png)

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [April 21, 2021, 3:55pm UTC](https://discourse.julialang.org/t/how-to-put-numbers-on-top-of-each-bar-in-a-bar-chart/59743/2 "2021-04-21T15:55:07Z")

</div>

Using VegaLite.jl there is an example:  
[https://www.queryverse.org/VegaLite.jl/stable/examples/examples\_barcharts/#Bar-Chart-with-Labels-1](https://www.queryverse.org/VegaLite.jl/stable/examples/examples_barcharts/#Bar-Chart-with-Labels-1)

But you are probably using Plots.jl, which is fine, but then I don’t know 🙂

---

<div class="post-metadata">

**Author:** ![zxjroger](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zxjroger/32/11826_2.png) [@zxjroger](https://discourse.julialang.org/u/zxjroger)\
**Post date:** [April 21, 2021, 3:58pm UTC](https://discourse.julialang.org/t/how-to-put-numbers-on-top-of-each-bar-in-a-bar-chart/59743/3 "2021-04-21T15:58:11Z")

</div>

Yeah, I am using plot. Forgot to mention this.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [April 21, 2021, 4:52pm UTC](https://discourse.julialang.org/t/how-to-put-numbers-on-top-of-each-bar-in-a-bar-chart/59743/4 "2021-04-21T16:52:57Z")

</div>

Please check this [post](https://discourse.julialang.org/t/how-to-add-data-labels-to-bar-plot/56168/3) out.

---

<div class="post-metadata">

**Author:** ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Post date:** [April 21, 2021, 5:07pm UTC](https://discourse.julialang.org/t/how-to-put-numbers-on-top-of-each-bar-in-a-bar-chart/59743/5 "2021-04-21T17:07:35Z")

</div>

Not to brag, but since then it has been fixed so you just need to do `plot(x, y; st=:bar, texts=y)`

(As of [Bar chart series\_annotations by gustaphe · Pull Request #3329 · JuliaPlots/Plots.jl · GitHub](https://github.com/JuliaPlots/Plots.jl/pull/3329))
