diff --git a/src/colors.jl b/src/colors.jl index b65291d..2e8667c 100644 --- a/src/colors.jl +++ b/src/colors.jl @@ -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 @@ -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 @@ -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 @@ -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