Hello everyone, I have been using the Makie.jl package (more specifically CairoMakie) for the creation of figures for the project I am working on. I am currently creating a scatterplot and would like to annotate my datapoints with their identity; however, it is not clear to me how to do this. The only thing I can find about it in the documentation is the following:
annotations(strings::Vector{String}, positions::Vector{Point})
However, the position of the datapoints in my figure have both an x and a y. Does anyone know how to implement this in a scatterplot?
This is my code currently:
x=[1.0,2.0,3.0]
y=[1.0,2.0,3.0]
annotation=["A","B","C"]
location=[1.0 1.0 1.0
2.0 2.0 2.0
3.0 3.0 2.0]
fig = Figure()
tit = "Testannotation"
xlab = "x"
ylab = "y"
ax = Axis(fig[1, 1], xlabel = xlab, ylabel = ylab, title = tit)#
scatter!(x,y)
annotations!(annotation,location)
no matter what I do i always get the letters in the bottom left corner. I tried a vector and matrices and even single numbers for location. Somehow the function never produces an error regardless of what i put in and the position of the letters never changes. they are all displayed on top of each other in the bottom left corner.
Example figure:
Thanks in advance.