Use NaNMath.extrema rather than Base.extrema

To avoid returning NaN when there are NaNs in the Vector
This commit is contained in:
Michael K. Borregaard 2017-05-22 22:49:20 +02:00
parent 2a0a5f2d08
commit 1714c8e434
3 changed files with 3 additions and 1 deletions

View File

@ -9,3 +9,4 @@ Measures
Showoff
StatsBase 0.14.0
JSON
NaNMath

View File

@ -10,6 +10,7 @@ using Base.Meta
@reexport using PlotThemes
import Showoff
import StatsBase
import NaNMath: extrema
export
grid,

View File

@ -118,7 +118,7 @@ Base.show(io::IO, axis::Axis) = dumpdict(axis.d, "Axis", true)
# Base.getindex(axis::Axis, k::Symbol) = getindex(axis.d, k)
Base.setindex!(axis::Axis, v, ks::Symbol...) = setindex!(axis.d, v, ks...)
Base.haskey(axis::Axis, k::Symbol) = haskey(axis.d, k)
Base.extrema(axis::Axis) = (ex = axis[:extrema]; (ex.emin, ex.emax))
extrema(axis::Axis) = (ex = axis[:extrema]; (ex.emin, ex.emax)) #This is the NaNMath version, not the Base version
const _scale_funcs = Dict{Symbol,Function}(