line in plot

# Sample data
x <- 1:10
y <- x^2

# Create a scatter plot
plot(x, y, type = "p", pch = 16, col = "blue", main = "Scatter Plot", xlab = "X-axis", ylab = "Y-axis")

# Add a line to the plot
abline(h = 30, col = "red", lty = 2, lwd = 2)

# Add text annotation
text(5, 30, "Horizontal Line", col = "red", pos = 4)