# Data Coordinates included in plot (Matlab calls it data tip)

**URL:** <https://discourse.julialang.org/t/data-coordinates-included-in-plot-matlab-calls-it-data-tip/53405>\
**Category:** Data\
**Created:** [January 15, 2021, 8:23pm UTC](https://discourse.julialang.org/t/data-coordinates-included-in-plot-matlab-calls-it-data-tip/53405 "2021-01-15T20:23:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [January 16, 2021, 9:54am UTC](https://discourse.julialang.org/t/data-coordinates-included-in-plot-matlab-calls-it-data-tip/53405/2 "2021-01-16T09:54:10Z")

</div>

It isn’t entirely clear to me from the question what you want:

- Do you want to just annotate your plot?

```julia
julia> using Plots

julia> plot(rand(10), annotate = (5, 0.5, "my text here"))

```

![image](https://global.discourse-cdn.com/julialang/original/3X/a/a/aa1d551c6bf14be394005e32d0f4a9a74d74704b.png)

- Do you want to see (x,y) coordinates of a plot on mouse hover? This works e.g. with the Plotly backend for Plots.jl:

```julia
julia> using Plots; plotly()

julia> plot(rand(10))

```

![image](https://global.discourse-cdn.com/julialang/original/3X/d/d/dd09d49623681f4e4d388dc6a12a40983fe823dc.png)

- Or do you want to be able to click on a point in your graph and have those coordinates labelled upon clicking? I don’t have an exact idea of how that would work, but I assume you’d have to write some custom code that allows for recording mouse click events - there’s an example of how to do it using PyPlot.jl here: [Storing mouse click event coordinates in PyPlot window](https://discourse.julialang.org/t/storing-mouse-click-event-coordinates-in-pyplot-window/21117). Once you’ve recorded the mouse click event you can re-plot with an annotation added.

---

_[View the full topic](https://discourse.julialang.org/t/data-coordinates-included-in-plot-matlab-calls-it-data-tip/53405)._
