# Add horizontal and vertical lines to a Plot [closed]

I have this function:

f[x] := -29.9092 + 0.456839 x


Now I plot it:

Plot[f[x],{x,120,150}]


If I want to highlight a specfic point:

 x1 = {{130,f[130]}}


I would like to have a vertical line going from the x-Axis to that point and ending at that point (like: Filling -> Bottom) and a horizontal line going from the y-Axis and ending at that point.

How can I do it ?

## closed as off-topic by Feyre, march, happy fish, Öskå, MarcoBMar 31 '17 at 7:20

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Feyre, march, happy fish, Öskå, MarcoB
If this question can be reworded to fit the rules in the help center, please edit the question.

• Epilog->Line[{{130,0},{130, f[130]}}] – David G. Stork Mar 29 '17 at 18:13

This can be accomplished using ListLinePlot in combination with the original Plot:

f[x_] := -29.9092 + 0.456839 x

Show[Plot[f[x], {x, 120, 150}],
ListLinePlot[{{{120, f[130]}, {130, f[130]}}, {{130, f[120]}, {130,
f[130]}}}, PlotStyle -> Red]]


You can also can also get the same effect using @DavidGStork suggestion:

Plot[f[x], {x, 120, 150},
Epilog -> {Line[{{130, f[120]}, {130, f[130]}}],
Line[{{120, f[130]}, {130, f[130]}}]}]


• Great !! Thanks ! :) – henry Mar 29 '17 at 18:15
• Line[{{130, f[120]}, {130, f[130]}, {120, f[130]}}] should also work and is simpler. – anderstood Mar 29 '17 at 18:19