From 36a29357a3e4b28a952e4ae0d1f84228cb3840de Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Sun, 12 Jun 2016 20:22:57 -0400 Subject: [PATCH] only widen axis limits for identity scale; closes #326 --- src/axes.jl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/axes.jl b/src/axes.jl index 1d05dc39..66c30bc1 100644 --- a/src/axes.jl +++ b/src/axes.jl @@ -219,12 +219,15 @@ function widen(lmin, lmax) lmin-eps, lmax+eps end -# figure out if widening is a good idea +# figure out if widening is a good idea. if there's a scale set it's too tricky, +# so lazy out and don't widen function default_should_widen(axis::Axis) should_widen = false - for series in series_list(axis.sp) - if series.d[:seriestype] in (:scatter,) || series.d[:markershape] != :none - should_widen = true + if axis[:scale] == :identity + for series in series_list(axis.sp) + if series.d[:seriestype] in (:scatter,) || series.d[:markershape] != :none + should_widen = true + end end end should_widen