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:
parent
52ec432cfa
commit
f35de64773
@ -47,7 +47,7 @@ num_series(x::AMat) = size(x, 2)
|
|||||||
num_series(x) = 1
|
num_series(x) = 1
|
||||||
|
|
||||||
RecipesBase.apply_recipe(plotattributes::AKW, ::Type{T}, plt::AbstractPlot) where {T} =
|
RecipesBase.apply_recipe(plotattributes::AKW, ::Type{T}, plt::AbstractPlot) where {T} =
|
||||||
throw(MethodError(T, "Unmatched plot recipe: $T"))
|
nothing
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user