diff --git a/src/backends/gadfly.jl b/src/backends/gadfly.jl index 043d5536..a0e51901 100644 --- a/src/backends/gadfly.jl +++ b/src/backends/gadfly.jl @@ -380,14 +380,19 @@ function addGadflyLimitsScale(gplt, d::Dict, isx::Bool) # do we want to add min/max limits for the axis? limsym = isx ? :xlims : :ylims limargs = Any[] - lims = get(d, limsym, :auto) - lims == :auto && return - if limsType(lims) == :limits - push!(limargs, (:minvalue, min(lims...))) - push!(limargs, (:maxvalue, max(lims...))) + # map :auto to nothing, otherwise add to limargs + lims = get(d, limsym, :auto) + # lims == :auto && return + if lims == :auto + lims = nothing else - error("Invalid input for $(isx ? "xlims" : "ylims"): ", lims) + if limsType(lims) == :limits + push!(limargs, (:minvalue, min(lims...))) + push!(limargs, (:maxvalue, max(lims...))) + else + error("Invalid input for $(isx ? "xlims" : "ylims"): ", lims) + end end # replace any current scales with this one diff --git a/test/refimg/gadfly/ref5.png b/test/refimg/gadfly/ref5.png index ca65d09b..0cc43bf3 100644 Binary files a/test/refimg/gadfly/ref5.png and b/test/refimg/gadfly/ref5.png differ