# Annotation which doesn't depend on the scale?

**URL:** https://discourse.julialang.org/t/annotation-which-doesnt-depend-on-the-scale/37759
**Category:** New to Julia
**Tags:** question, plotting, plots
**Created:** [April 17, 2020, 12:30pm UTC](https://discourse.julialang.org/t/annotation-which-doesnt-depend-on-the-scale/37759 "2020-04-17T12:30:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![br500](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@br500](https://discourse.julialang.org/u/br500)
#### Post date: [April 17, 2020, 12:30pm UTC](https://discourse.julialang.org/t/annotation-which-doesnt-depend-on-the-scale/37759/1 "2020-04-17T12:30:07Z")

</div>

Is there any way to add annotation (which doesn’t depend on the scale) to plot?  
I’ve seen:

> plot!(annotation = (0, 1, text(“example”)))

but i want to “stick” annotation for example 15mm from left border, 15 mm from top border even if I change xlim and ylim.

I’m using Plots; gr() backend

---

<div class="post-metadata">

### Author: ![ssfrr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ssfrr/32/3736_2.png) [@ssfrr](https://discourse.julialang.org/u/ssfrr)
#### Post date: [April 17, 2020, 12:47pm UTC](https://discourse.julialang.org/t/annotation-which-doesnt-depend-on-the-scale/37759/2 "2020-04-17T12:47:46Z")

</div>

I actually just reported a very similar issue yesterday:

[https://github.com/JuliaPlots/Plots.jl/issues/2591](https://github.com/JuliaPlots/Plots.jl/issues/2591)

I think the main intended usage behind annotations is to annotate data, which is why it’s expressed in data space. I agree it would be useful to be able to express annotation locations in plot space as well.

---

<div class="post-metadata">

### Author: ![br500](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@br500](https://discourse.julialang.org/u/br500)
#### Post date: [April 17, 2020, 1:11pm UTC](https://discourse.julialang.org/t/annotation-which-doesnt-depend-on-the-scale/37759/4 "2020-04-17T13:11:20Z")

</div>

I see, thank you. My problem could also be solved if I could somehow manually move labels (instead of annotations) to certain position in plot space, but the only arguments I see are :top, :bottom etc…

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [April 18, 2020, 8:29am UTC](https://discourse.julialang.org/t/annotation-which-doesnt-depend-on-the-scale/37759/5 "2020-04-18T08:29:30Z")

</div>

In PGFPlotsX, you can use the _axis coordinate system_, eg

```julia
using PGFPlotsX
@pgf Axis(Plot({ only_marks }, Table(0:10, 0:10)),
          raw"\node at (rel axis cs:0.3,0.7) {$\sqrt{a^2 + 1}$};")

```

 ![fig](https://global.discourse-cdn.com/julialang/original/3X/6/9/69c367d09437cbd16a783335a753e35664d67873.png)

If you prefer, you can specify things in `mm` relative to things with a bit of effort (see the the tikz/pgfplots manuals), but relative coordinates in the [0,1]^2 box are generally the most convenient.
