# Lines in Logplot

I am trying to add vertical lines as markers in a LogPlot. When I am doing this in a normal Plot works fine. When I change to LogPlot the lines start from a value of y=1 and not from 0,01 as I have defined them. Does someone know how can I fix it?

line1 = Line[{{10*10^9, 0.01}, {10*10^9, 2}}];
line2 = Line[{{30*10^9, 0.01}, {30*10^9, 2}}];
line3 = Line[{{200*10^9, 0.01}, {200*10^9, 2}}];
lineStyle = {Black, Dashed};

Plot[dw //. {h -> 2, vs -> 200, H -> 5}, {EE, 1*10^9, 300*10^9},
AxesOrigin -> {0, 0.01}, Frame -> {True, True, True, True},
AspectRatio -> 1, PlotStyle -> {{Blue}},
BaseStyle -> {FontSize -> 12},
Epilog -> {Directive[lineStyle], line1, line2, line3},
FrameTicks -> {{#, 10^-9 #} & /@
FindDivisions[{1*10^9, 300*10^9, 10}, 10] // N, Automatic}] LogPlot[dw //. {h -> 2, vs -> 200, H -> 5}, {EE, 1*10^9, 300*10^9},
AxesOrigin -> {0, 0.01}, Frame -> {True, True, True, True},
AspectRatio -> 1, PlotStyle -> {{Blue}},
BaseStyle -> {FontSize -> 12},
Epilog -> {Directive[lineStyle], line1, line2, line3},
FrameTicks -> {{#, 10^-9 #} & /@
FindDivisions[{1*10^9, 300*10^9, 10}, 10] // N, Automatic}] • Can you include data for dw? – MarcoB Mar 1 '16 at 7:55
• Why not use GridLines instead to mark the verticals? – J. M. is away Mar 1 '16 at 8:25

You need to scale the y-coordinate of the Line objects via Log. Notice that the lines start near y=1, this is because E^0.01=1.01.

You can modify your original lines by a replacement rule,

LogPlot[dw //. {h -> 2, vs -> 200, H -> 5}, {EE, 1*10^9, 300*10^9},
AxesOrigin -> {0, 0.01}, Frame -> {True, True, True, True},
AspectRatio -> 1, PlotStyle -> {{Blue}},
BaseStyle -> {FontSize -> 12},
Epilog -> {Directive[lineStyle], {line1, line2, line3} /.
Line[{{a_, b_}, {c_, d_}}] :> Line[{{a, Log@b}, {c, Log@d}}]},
FrameTicks -> {{#, 10^-9 #} & /@
FindDivisions[{1*10^9, 300*10^9, 10}, 10] // N, Automatic},
PlotRange -> {{0, 300 10^9}, {0, 800}}] or by using MapAt,

LogPlot[dw //. {h -> 2, vs -> 200, H -> 5}, {EE, 1*10^9, 300*10^9},
AxesOrigin -> {0, 0.01}, Frame -> {True, True, True, True},
AspectRatio -> 1, PlotStyle -> {{Blue}},
BaseStyle -> {FontSize -> 12},
Epilog -> {Directive[lineStyle],
MapAt[Log, {line1, line2, line3}, {All, 1, All, 2}]},
FrameTicks -> {{#, 10^-9 #} & /@
FindDivisions[{1*10^9, 300*10^9, 10}, 10] // N, Automatic},
PlotRange -> {{0, 300 10^9}, {0, 800}}]


which gives the same result as above.