# How to annotate with arrows in Julia Plots?

**URL:** <https://discourse.julialang.org/t/how-to-annotate-with-arrows-in-julia-plots/66931>\
**Category:** Visualization\
**Tags:** plots\
**Created:** [August 24, 2021, 6:11pm UTC](https://discourse.julialang.org/t/how-to-annotate-with-arrows-in-julia-plots/66931 "2021-08-24T18:11:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Minimum-Pollution-96](https://avatars.discourse-cdn.com/v4/letter/m/a88e4f/32.png) [@Minimum-Pollution-96](https://discourse.julialang.org/u/Minimum-Pollution-96)\
**Post date:** [August 24, 2021, 6:11pm UTC](https://discourse.julialang.org/t/how-to-annotate-with-arrows-in-julia-plots/66931/1 "2021-08-24T18:11:10Z")

</div>

Is there a way to achieve annotations similar to [matplotlib](https://matplotlib.org/stable/tutorials/text/annotations.html) without switching the backends for Plots? I am especially looking for a way to annotate with arrows. The current method as seen in [docs](https://docs.juliaplots.org/latest/generated/gr/#gr-ref20) seems to support only text.

I found a way to [add arrows manually](https://stackoverflow.com/questions/60529422/use-gr-arrow-styles-in-julia-plots) but I wonder if there’s an easier or straightforward way to get such annotations.

---

<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:** [August 24, 2021, 7:39pm UTC](https://discourse.julialang.org/t/how-to-annotate-with-arrows-in-julia-plots/66931/2 "2021-08-24T19:39:55Z")

</div>

You could use Plots.jl pyplot() backend with those specific annotation functions.  
Otherwise you may use `quiver!` and `annotate!`, which work for several Plots.jl backends. A basic example follows:

```julia
using Plots; gr()
plot(sin, 0:0.1:2π, label="sin(x)")
quiver!([π + 1], [0.2], quiver=([-1], [-0.2]))
annotate!([π + 1], [0.3],"sin(x)=0")

```

 ![Plots_gr_annotate_with_arrows_and_text](https://global.discourse-cdn.com/julialang/original/3X/0/5/05ee7f72bb08bdb14305b7e03effbaeea34a90d1.png)
