# Ploting horizontal lines in a ListLinePlot?

Hello i have made a graph with a oscillating behavior but i need to highlight the maximum value of the oscillation because i will use that value like a threshold and I need to put a horizontal line in that particular spot of the graph. So for example, let say that i have the next data:

data = Table[{i, Sin[i]}, {i, 0, 4 Pi, Pi/100}]


Then I plot the data with the next command:

 ListLinePlot[data]


And I get the next graph:

So i need to put an horizontal line in the y= 1 coordinate because that's the max value of the curves, how can i do that?

ListLinePlot[Table[{i, Sin[i]}, {i, 0, 4 Pi, Pi/100}], GridLines -> {None, {1}},
GridLinesStyle -> Directive[AbsoluteThickness[3/2], ColorData[97, 2]]
Method -> {"GridLinesInFront" -> True}]


It's always nice to have alternatives:

ListLinePlot[Table[{i, Sin[i]}, {i, 0, 4 Pi, Pi/100}],
Epilog -> {Directive[AbsoluteThickness[2], ColorData[97, 2]],
InfiniteLine[{0, 1}, {1, 0}]}]

ListLinePlot[data, Epilog -> Line[{{0, 1}, {4 Pi, 1}}]]


• For this problem 1 is the right number. I think you want to generalize it and maybe use Max[data[[All,2]]], possibly defined using With so you don't compute it twice. – Jack LaVigne Oct 20 '15 at 18:14