From 1852ba99b35b96c6b2a858c3744c1edcd32ed334 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas Date: Sat, 15 Apr 2017 13:16:40 -0700 Subject: [PATCH] force real x --- src/recipes.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/recipes.jl b/src/recipes.jl index 83b3a8e8..a22dc069 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -811,8 +811,8 @@ end # Splits a complex matrix to its real and complex parts # Reals defaults solid, imaginary defaults dashed -# Label defaults are changed to match the real-imaginary reference / indexing -@recipe function f{T<:Number,T2<:Number}(x::AbstractArray{T},y::Array{Complex{T2}}) +# Label defaults are changed to match the real-imaginary reference / indexing +@recipe function f{T<:Real,T2<:Number}(x::AbstractArray{T},y::Array{Complex{T2}}) A = real.(y) B = imag.(y) _y = [!iseven(i) ? A[:,i÷2+1] : B[:,i÷2] for i in 1:2size(A,2)]