No exception thrown in apply_recipe fallback

Throwing an exception here can vastly slow down plotting, as it happens frequently. Returning an error value instead, which the calling function can check, can speed up plotting 2x. An accompanying change is necessary in RecipesPipeline.jl, assuming this value is suitable.
This commit is contained in:
Nicholas Bauer 2021-08-25 11:35:35 -04:00 committed by GitHub
parent 52ec432cfa
commit f35de64773
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,7 +47,7 @@ num_series(x::AMat) = size(x, 2)
num_series(x) = 1
RecipesBase.apply_recipe(plotattributes::AKW, ::Type{T}, plt::AbstractPlot) where {T} =
throw(MethodError(T, "Unmatched plot recipe: $T"))
nothing
# ---------------------------------------------------------------------------