# Make text annotations using the algebra of graphics

**URL:** <https://discourse.julialang.org/t/make-text-annotations-using-the-algebra-of-graphics/87930>\
**Category:** Visualization\
**Tags:** algebraofgraphics\
**Created:** [September 28, 2022, 1:11pm UTC](https://discourse.julialang.org/t/make-text-annotations-using-the-algebra-of-graphics/87930 "2022-09-28T13:11:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![martinmestre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/martinmestre/32/215857_2.png) [@martinmestre](https://discourse.julialang.org/u/martinmestre)\
**Post date:** [September 28, 2022, 1:11pm UTC](https://discourse.julialang.org/t/make-text-annotations-using-the-algebra-of-graphics/87930/1 "2022-09-28T13:11:28Z")

</div>

Hello,  
is there a way to implement text annotations using mapping() ?  
If possible I would like to know how to annotate text at the bottom or tip of little thin arrows.  
If not possible withing AoG, I would like to know how to do it with the help of Makie.  
I tried to find this information in the web but couldn’t solve it.  
Thank you very much.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [September 29, 2022, 8:19am UTC](https://discourse.julialang.org/t/make-text-annotations-using-the-algebra-of-graphics/87930/3 "2022-09-29T08:19:46Z")

</div>

Should be `mapping(:x, :y, text = :text) * visual(Text)`, the signature of `Text` is now similar to `Scatter` et al. Maybe with `:text => verbatim` if AoG wants to convert it to numbers otherwise.

---

<div class="post-metadata">

**Author:** ![martinmestre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/martinmestre/32/215857_2.png) [@martinmestre](https://discourse.julialang.org/u/martinmestre)\
**Post date:** [September 29, 2022, 1:40pm UTC](https://discourse.julialang.org/t/make-text-annotations-using-the-algebra-of-graphics/87930/4 "2022-09-29T13:40:43Z")

</div>

Thank you both. It gives me error when I write  
`*visual(Text):`

```julia
type ERROR: UndefVarError: Text not defined
Stacktrace:
 [1] plot_splus_streams(df::DataFrame, file::String)
   @ Main /mnt/md1/mmestre/work/2022/RiosDelCosmos/footprints/galstreams.jl:75
 [2] top-level scope
   @ /mnt/md1/mmestre/work/2022/RiosDelCosmos/footprints/galstreams.jl:117
or paste code here

```

Besides this issue, how could I annotate with text+little arrows?  
Thanks.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [September 29, 2022, 2:55pm UTC](https://discourse.julialang.org/t/make-text-annotations-using-the-algebra-of-graphics/87930/5 "2022-09-29T14:55:23Z")

</div>

Makie.Text then, I think Base has a Text as well.
