diff --git a/src/plot_recipe.jl b/src/plot_recipe.jl index 06e2db9..3630629 100644 --- a/src/plot_recipe.jl +++ b/src/plot_recipe.jl @@ -31,15 +31,20 @@ function _process_plotrecipe(plt, kw, kw_list, still_to_process) st = kw[:seriestype] st = kw[:seriestype] = type_alias(plt, st) datalist = RecipesBase.apply_recipe(kw, Val{st}, plt) - warn_on_recipe_aliases!(plt, datalist, :plot, st) - for data in datalist - preprocess_attributes!(plt, data.plotattributes) - if data.plotattributes[:seriestype] == st - error("Plot recipe $st returned the same seriestype: $(data.plotattributes)") + if !isnothing(datalist) + warn_on_recipe_aliases!(plt, datalist, :plot, st) + for data in datalist + preprocess_attributes!(plt, data.plotattributes) + if data.plotattributes[:seriestype] == st + error("Plot recipe $st returned the same seriestype: $(data.plotattributes)") + end + push!(still_to_process, data.plotattributes) end - push!(still_to_process, data.plotattributes) + else + push!(kw_list, kw) end catch err + # the try/catch block can be removed when Plots.jl makes the compensating change if err isa MethodError && occursin("plot recipe", err.args) push!(kw_list, kw) else