# How to Plot Vertical Asymptote [duplicate]

How can I plot the vertical asymptote x=3 for this function: f(x)=Log2(x-3)

This is what I have tried so far:

Plot[Log[2, (x - 3)], {x, -10, 10}, PlotRange -> {-10, 10}]

• I suggest the following: 1) As you receive help, try to give it too, by answering questions. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the check mark sign! – ercegovac Oct 13 '17 at 8:39
• Look up InfiniteLine[]. – J. M.'s technical difficulties Oct 13 '17 at 9:24

ParametricPlot

ParametricPlot[{{x, Log[2, (x - 3)]}, {3, Rescale[x, {-10, 10}, {-5, 3}]}}, {x, -10, 10},
PlotRange -> {{0, 10}, {-5, 3}}] GridLines

Plot[Log[2, x - 3], {x, -10, 10}, PlotRange -> {{0, 10}, {-5, 3}},
GridLines -> {{{3, Directive[Thick, Red]}}, None}] If your plot has horizontal GridLines (say, Range), re-style the horizontal grid line at 3 using

 GridLines -> {Range /. 3 -> {3, Directive[Thick, Red]},  Automatic}]


to get A first thing that comes to mind

Plot[{Log[2, (x - 3)]}, {x, -10, 10},
PlotRange -> {{0, 10}, Automatic}, Epilog -> Line[{{3, -3}, {3, 3}}]]


which gives ## Edit

As suggested by @J.M., infinite line is better option because it scales with the plot.

Plot[{Log[2, (x - 3)]}, {x, -10, 10},
PlotRange -> {{0, 10}, Automatic},
Epilog -> InfiniteLine[{{3, -3}, {3, 3}}], GridLines -> Automatic] • Thankyou so much but could you please explain what this computation means? PlotRange -> {{0, 10}, Automatic}, Epilog -> Line[{{3, -3}, {3, 3}}]] – Sath Oct 13 '17 at 8:23
• Please first read the links in the comment I have left to your original answer. Familiarize yourself with Mathematica help. I know it can be very difficult to find a function that does something, but once someone shows you that it should be very easy to read help, particularly as in this case, Epilog is built-in Option. There are great resources on this site for beginners. You can start with discussion on this thread – ercegovac Oct 13 '17 at 8:45