(complex) type recipe
This commit is contained in:
parent
7def4e8e73
commit
0be0824207
@ -801,12 +801,10 @@ datetimeformatter(dt) = string(convert(DateTime, dt))
|
|||||||
# -------------------------------------------------
|
# -------------------------------------------------
|
||||||
# Complex Numbers
|
# Complex Numbers
|
||||||
|
|
||||||
@userplot ComplexPlot
|
@recipe function f{T<:Number}(A::Array{Complex{T}})
|
||||||
@recipe function f(cp::ComplexPlot)
|
xguide --> "Re(x)"
|
||||||
xguide --> "Real Part"
|
yguide --> "Im(x)"
|
||||||
yguide --> "Imaginary Part"
|
real.(A), imag.(A)
|
||||||
seriestype --> :scatter
|
|
||||||
real(cp.args[1]), imag(cp.args[1])
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Splits a complex matrix to its real and complex parts
|
# Splits a complex matrix to its real and complex parts
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user