# How do I add a vertical thick line to log-log plots?

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)

 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}, {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

• Plot[Sin[x], {x, 0, 10}, Epilog -> {Thickness[0.03], InfiniteLine[{3, 0}, {0, 1}]}] Jul 13, 2018 at 11:15

An easy solution is to add the option GridLinesStyle

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


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}},
{}
}]


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 -> {
Thick,
InfiniteLine[{{Log@700, 0}, {Log@700, 1}}]
}]


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.