From b1817e513be1eaa64a9a17f524c9f678d5d92f70 Mon Sep 17 00:00:00 2001 From: "Michael K. Borregaard" Date: Mon, 18 Dec 2017 09:19:31 +0100 Subject: [PATCH] Don't return false --- src/recipes.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/recipes.jl b/src/recipes.jl index 07ac0c1b..8c669a78 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -989,7 +989,11 @@ end function abline!(plt::Plot, a, b; kw...) xl, yl = xlims(plt), ylims(plt) x1, x2 = max(xl[1], (yl[1] - b)/a), min(xl[2], (yl[2] - b)/a) - x2 > x1 && plot!(plt, x -> b + a*x, x1, x2; kw...) + if x2 > x1 + plot!(plt, x -> b + a*x, x1, x2; kw...) + else + nothing + end end abline!(args...; kw...) = abline!(current(), args...; kw...)