How do I add a vertical thick line to my ListLogLogPlot? I tried with the following code (a minimal non working example), but I get an error (the plot becomes pink)

 ListLogLogPlot[{tab1, tab}, GridLines -> {{790,Thick}, {1}}]

I also tried with Epilog as written in this question: it gives no error, but it doesn't plot any vetical line.

I use Mathematica 10

  • 2
    $\begingroup$ Plot[Sin[x], {x, 0, 10}, Epilog -> {Thickness[0.03], InfiniteLine[{3, 0}, {0, 1}]}] $\endgroup$
    – Szabolcs
    Commented Jul 13, 2018 at 11:15

2 Answers 2


An easy solution is to add the option GridLinesStyle

ListLogLogPlot[{tab1, tab}, GridLines -> {{ 790 }, {1}}, 
GridLinesStyle -> { Thick, None} ]

enter image description here


For the first one, you're missing a pair of brackets. The format is {xlist, ylist} where xlist is in the form {{x1, style}, {x2, style}...}. A lot of brackets, admittedly.

tab = Table[{j, j^2}, {j, 1, 1000, 10}];
tab1 = Table[{j, j^1/2}, {j, 1, 1000, 10}];
ListLogLogPlot[{tab1, tab}, GridLines -> {
   {{790, Thick}},

Mathematica graphics

For the Epilog attempt, I'm guessing that you probably did not take the logarithm of the x value. It should be done like this:

ListLogLogPlot[{tab1, tab}, Epilog -> {
   InfiniteLine[{{Log@700, 0}, {Log@700, 1}}]

Mathematica graphics

The labels are placed on a logarithmic scale, but the underlying coordinate system is still linear. That is why we have to take the logarithm of our coordinates to get the expected result when using ListLogLogPlot.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.