# Inline labeling on line plot (using Plots.jl)

**URL:** <https://discourse.julialang.org/t/inline-labeling-on-line-plot-using-plots-jl/104250>\
**Category:** Visualization\
**Tags:** question, package\
**Created:** [September 26, 2023, 9:11am UTC](https://discourse.julialang.org/t/inline-labeling-on-line-plot-using-plots-jl/104250 "2023-09-26T09:11:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brent](https://avatars.discourse-cdn.com/v4/letter/b/ec9cab/32.png) [@Brent](https://discourse.julialang.org/u/Brent)\
**Post date:** [September 26, 2023, 9:11am UTC](https://discourse.julialang.org/t/inline-labeling-on-line-plot-using-plots-jl/104250/1 "2023-09-26T09:11:12Z")

</div>

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](https://github.com/cphyc/matplotlib-label-lines) for Python. Some examples from the documentation of the package below.

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

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.

---

<div class="post-metadata">

**Author:** ![Sevi](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@Sevi](https://discourse.julialang.org/u/Sevi)\
**Post date:** [October 5, 2023, 10:20am UTC](https://discourse.julialang.org/t/inline-labeling-on-line-plot-using-plots-jl/104250/2 "2023-10-05T10:20:58Z")

</div>

That reminded me of contour labels like here  
[https://docs.juliaplots.org/latest/series\_types/contour/#Common-Attributes](https://docs.juliaplots.org/latest/series_types/contour/#Common-Attributes)

But according to this (very old) [issue](https://github.com/JuliaPlots/Plots.jl/issues/1574), 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.

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [October 5, 2023, 10:27am UTC](https://discourse.julialang.org/t/inline-labeling-on-line-plot-using-plots-jl/104250/3 "2023-10-05T10:27:11Z")

</div>

Those are called _annotated lines_ in GMT.jl and one can do [this](https://www.generic-mapping-tools.org/GMTjl_doc/examples/themes/01_themes/#how_to_sin) or [this](https://www.generic-mapping-tools.org/GMTjl_doc/examples/plotting_functions/01_lines/#text_decorated_line)
