How to make this plot in Julia?

tp2750
Sun, 23 Jan 2022 13:10:07 +0000
Visualization

How do I make something similar to the following plot in Julia?

using RCall, DataFrames, Random
Random.seed!(123)
d = DataFrame(name = repeat(["A","B","C","D","E","F"], inner=4),
      time=repeat([0,1,3,6], outer=6), value = rand(24));
@rput d
R"""
library(ggplot2)
library(ggrepel)
ggplot(d, aes(x=time,y=value, color=name)) + geom_point() + geom_line() +
geom_text_repel(aes(label=name)) + ggtitle("Time evolution")
"""

The features I struggle to reproduce in Plots.jl are:

Grouping points in a scatter plot (by name) and connecting them by a line

Positioning the labels close to the points without overlapping

Even without ggrepel I can get the following in ggplot2, which is ok:

R"""
library(ggplot2)
ggplot(d, aes(x=time,y=value, color=name)) + geom_point() + geom_line() +
geom_text(aes(label=name), nudge_y=.03) + ggtitle("No repel")
"""

30 posts - 11 participants