allow plotting of Any vectors
This commit is contained in:
parent
ff774dc409
commit
844c3f7002
@ -30,7 +30,13 @@ convertToAnyVector(n::Integer) = Any[zeros(0) for i in 1:n]
|
|||||||
convertToAnyVector(v::AVec{<:DataPoint}) = Any[prepareSeriesData(v)]
|
convertToAnyVector(v::AVec{<:DataPoint}) = Any[prepareSeriesData(v)]
|
||||||
|
|
||||||
# list of things (maybe other vectors, functions, or something else)
|
# list of things (maybe other vectors, functions, or something else)
|
||||||
convertToAnyVector(v::AVec) = vcat((convertToAnyVector(vi) for vi in v)...)
|
function convertToAnyVector(v::AVec)
|
||||||
|
if all(x -> isa(x, Number) || ismissing(x), v) || all(x -> isa(x, AbstractString) || ismissing(x), v)
|
||||||
|
convertToAnyVector(convert.(DataPoint, v))
|
||||||
|
else
|
||||||
|
Any[prepareSeriesData(v)] : vcat((convertToAnyVector(vi) for vi in v)...)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Matrix is split into columns
|
# Matrix is split into columns
|
||||||
convertToAnyVector(v::AMat{<:DataPoint}) = Any[prepareSeriesData(v[:,i]) for i in 1:size(v,2)]
|
convertToAnyVector(v::AMat{<:DataPoint}) = Any[prepareSeriesData(v[:,i]) for i in 1:size(v,2)]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user