fixed gadfly scales bug and new ref img; closes #74

This commit is contained in:
Thomas Breloff 2015-11-20 08:58:45 -05:00
parent a8c40a5493
commit e92b5b2d35
2 changed files with 11 additions and 6 deletions

View File

@ -380,14 +380,19 @@ function addGadflyLimitsScale(gplt, d::Dict, isx::Bool)
# do we want to add min/max limits for the axis? # do we want to add min/max limits for the axis?
limsym = isx ? :xlims : :ylims limsym = isx ? :xlims : :ylims
limargs = Any[] limargs = Any[]
lims = get(d, limsym, :auto)
lims == :auto && return
if limsType(lims) == :limits # map :auto to nothing, otherwise add to limargs
push!(limargs, (:minvalue, min(lims...))) lims = get(d, limsym, :auto)
push!(limargs, (:maxvalue, max(lims...))) # lims == :auto && return
if lims == :auto
lims = nothing
else 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 end
# replace any current scales with this one # replace any current scales with this one

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 45 KiB