2
$\begingroup$

I'm trying to draw a vertical line on a LogPlot using Epilog. There is a slight issue in the vertical positioning of the line. When I indicate the line should begin at 1 it instead begins at ~2.75.

LogPlot[Exp[x], {x, 0, 3}, Epilog -> Style[Line[{{2, 1}, {2, 10000}}], Thickness[.005]]]

Attempting to extend the line by lowering the starting point was unsuccessful. Raising the line works, but the starting point still doesn't correspond exactly to that requested. The issue is absent when doing a Plot command and present when doing other variants of Plot where the axis are on a Log scale.

enter image description here

$\endgroup$

1 Answer 1

4
$\begingroup$
LogPlot[Exp[x], {x, 0, 3}, 
 Epilog -> Style[Line[{{2, Log@1}, {2, 10000}}], Thickness[.005]]]

enter image description here

$\endgroup$

Your Answer

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

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