How to annotate with arrows in Julia Plots?

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:

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")

6 Likes