Skip to content

Commit

Permalink
Merge pull request #22 from mkborregaard/fix_extrema
Browse files Browse the repository at this point in the history
filter for NaN before extrema
  • Loading branch information
mkborregaard authored Jun 29, 2017
2 parents 7588afb + ac930d3 commit 8294d5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/colors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ end
# end
function plot_color{T<:Number}(zs::AbstractArray{T})
grad = cgrad()
zmin, zmax = extrema(zs)
zmin, zmax = extrema(zs[isfinite.(zs)])
a = Array{RGBA{Float64}}(size(zs))
for i in eachindex(zs)
a[i] = grad[(zs[i]-zmin)/(zmax-zmin)]
Expand Down

0 comments on commit 8294d5e

Please sign in to comment.