Inline labeling on line plot (using Plots.jl)

Is there a way to do inline labeling (or direct labeling) of lines in a line plot using the Plots.jl package? I’m looking for something similar to the package matplotlib-label-lines for Python. Some examples from the documentation of the package below.

Does something like this already exist (perhaps as another package)? Or how would one go about applying this using Plots.jl? Thank you in advance.

That reminded me of contour labels like here
https://docs.juliaplots.org/latest/series_types/contour/#Common-Attributes

But according to this (very old) issue, it seems like the corresponding functionality does not exist for normal line plots. But it would be great if this is possible at some point.

1 Like

Those are called annotated lines in GMT.jl and one can do this or this

3 Likes