0

This should be simple but I can't find the answer. All I want to do is add a line to a plot drawn at a specific y value starting at a specific x value and ending at a specific x value. The abline function doesn't seem to have a start and end parameter. How do I do this in r for normal (non ggplot) plots

Sebastian Zeki
  • 6,690
  • 11
  • 60
  • 125

1 Answers1

1

In a general case, to plot a line from point (x_1, y_1) to point (x_2, y_2), simply use lines(c(x_1, x_2), c(y_1, y_2))

ClementWalter
  • 4,814
  • 1
  • 32
  • 54