# Annotate Points in Plot

**URL:** <https://discourse.julialang.org/t/annotate-points-in-plot/82764>\
**Category:** Visualization\
**Tags:** plotting, gadfly\
**Created:** [June 14, 2022, 4:46pm UTC](https://discourse.julialang.org/t/annotate-points-in-plot/82764 "2022-06-14T16:46:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gjh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gjh/32/31762_2.png) [@gjh](https://discourse.julialang.org/u/gjh)\
**Post date:** [June 14, 2022, 4:46pm UTC](https://discourse.julialang.org/t/annotate-points-in-plot/82764/1 "2022-06-14T16:46:20Z")

</div>

Is there a way to annotate each point with its id number? I know it seems odd, but that is what we are hoping to display. Thank you

using DataFrames, Gadfly  
df = DataFrame((id = 1:20), value\_x=rand(20)\*100, value\_y = rand(20))  
plot(df, y=:value\_y, x=:value\_x, Geom.point)

---

<div class="post-metadata">

**Author:** ![bjarthur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bjarthur/32/9638_2.png) [@bjarthur](https://discourse.julialang.org/u/bjarthur)\
**Post date:** [June 14, 2022, 5:53pm UTC](https://discourse.julialang.org/t/annotate-points-in-plot/82764/2 "2022-06-14T17:53:31Z")

</div>

have you tried the [label](http://gadflyjl.org/stable/gallery/geometries/#%5BGeom.label%5D(@ref)) geometry?

---

<div class="post-metadata">

**Author:** ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Post date:** [June 14, 2022, 5:56pm UTC](https://discourse.julialang.org/t/annotate-points-in-plot/82764/3 "2022-06-14T17:56:45Z")

</div>

I am not sure if this is what you want, but this notebook contains lots of annotations (see towards the middle of the file):  
[notebook](https://github.com/PaulSoderlind/FinancialTheoryMSc/blob/master/Ch20_Options2.ipynb)
