Skip to content

Commit

Permalink
Merge pull request #12 from dpsanders/ijulia_0.6_deprecation
Browse files Browse the repository at this point in the history
0.6 deprecations
  • Loading branch information
mkborregaard authored May 9, 2017
2 parents 568a66b + b2fbdb2 commit 9aa6463
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/colors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plot_color(s::Symbol, α::Number) = (iscgrad_symbol(s) ? cgrad(s, alpha=α) : RG
plot_color(grad::ColorGradient, α::Number) = cgrad(grad, alpha=α)

function plot_color(cs::AbstractArray)
a = Array(RGBA{Float64}, size(cs))
a = Array{RGBA{Float64}}(size(cs))
for i in eachindex(cs)
a[i] = plot_color(cs[i])
end
Expand All @@ -30,7 +30,7 @@ end

# plot_color(cs::AbstractVector, α::Number) = RGBA{Float64}[plot_color(c,α) for c in cs]
function plot_color(cs::AbstractArray, α::Number)
a = Array(RGBA{Float64}, size(cs))
a = Array{RGBA{Float64}}(size(cs))
for i in eachindex(cs)
a[i] = plot_color(cs[i], α)
end
Expand All @@ -49,7 +49,7 @@ end
function plot_color{T<:Number}(zs::AbstractArray{T})
grad = cgrad()
zmin, zmax = extrema(zs)
a = Array(RGBA{Float64}, size(zs))
a = Array{RGBA{Float64}}(size(zs))
for i in eachindex(zs)
a[i] = grad[(zs[i]-zmin)/(zmax-zmin)]
end
Expand All @@ -62,7 +62,7 @@ end
# end
function plot_color{T<:Number}(zs::AbstractArray{T}, α::Number)
cs = plot_color(zs)
a = Array(RGBA{Float64}, size(zs))
a = Array{RGBA{Float64}}(size(zs))
for i in eachindex(zs)
a[i] = RGBA{Float64}(convert(RGB, cs[i]), α)
end
Expand Down

0 comments on commit 9aa6463

Please sign in to comment.