# How can I label a LogLog plot with the label on the graph/line?

I want to label a graph as shown in the attached image. I want the label on the line and parallel to the line that I am labeling, as it is shown in the image. Could you help me, please? Code:

LogLogPlot[{Exp[4]* x, Exp[10]*(x)}, {x, 1, 10^3}, Frame -> True,
FrameLabel -> {x, y}]


You can use custom Arrowheads as the option setting for PlotStyle and post-process to replace Lines with Arrows:

arrowheads = Arrowheads[{{.5, .5,
Graphics[Text[Framed[Style[#, 16], Background -> White, FrameStyle -> None]]]}}]& /@
{"W", "BLAH"};

LogLogPlot[{Exp[4]*x, Exp[10]*(x)}, {x, 1, 10^3}, Frame -> True,
PlotStyle -> arrowheads, FrameLabel -> {x, y}] /. Line -> Arrow


• This is a very clever hack using Arrowheads like this. Nice job. It's not likely to get easier than this. Jan 27, 2022 at 5:25
• @kglr Thanks a lot. Jan 27, 2022 at 5:27
• Suppose, I need to label one line and no need to label the other line - How do I need to modify this code? Jan 27, 2022 at 12:12
• @PoreyS, PlotStyle -> {arrowheads[[1]], Arrowheads[{}]} labels the first line only.
– kglr
Jan 27, 2022 at 13:30
• @kglr Thanks a lot. Jan 27, 2022 at 15:18