How to specify the span of hline in Plots.jl

The order in previous post seems to be reversed, if one wants horizontal lines. :slight_smile:
For multiple horizontal lines one can do:

y = [1.25 1.5 1.75 2]  # y-values for multiple horizontal lines
x1, x2 = 1, 2          # x end points for horizontal lines
plot!([x1; x2], [y; y], lw=2, lc=:black, legend=false)

Limited_span_horizontal_lines

1 Like