Handle the case where an implicit recipe returns a Vector{PlotElement}
This commit is contained in:
parent
9327492aa1
commit
e70c30dd13
@ -1125,7 +1125,16 @@ function parseArguments(_args...)
|
|||||||
elseif hasmethod(recipe, tuple(typeof(arg))) # ==> implicit recipe
|
elseif hasmethod(recipe, tuple(typeof(arg))) # ==> implicit recipe
|
||||||
# @info which(recipe, tuple(typeof(arg))) # debug
|
# @info which(recipe, tuple(typeof(arg))) # debug
|
||||||
deleteat!(args, pos)
|
deleteat!(args, pos)
|
||||||
insert!(args, pos, recipe(arg))
|
pe = recipe(arg)
|
||||||
|
if isa(pe, PlotElement)
|
||||||
|
insert!(args, pos, pe)
|
||||||
|
elseif isa(pe, Vector{PlotElement})
|
||||||
|
for i in 1:length(pe)
|
||||||
|
insert!(args, pos, pe[i])
|
||||||
|
end
|
||||||
|
else
|
||||||
|
error("Recipe must return a PlotElement or Vector{PlotElement}")
|
||||||
|
end
|
||||||
continue
|
continue
|
||||||
elseif isa(arg, Vector{PlotElement}) # ==> explicit recipe (vector)
|
elseif isa(arg, Vector{PlotElement}) # ==> explicit recipe (vector)
|
||||||
deleteat!(args, pos)
|
deleteat!(args, pos)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user