From acfda5ea695469d462a8afdfee3284c24ffd1d44 Mon Sep 17 00:00:00 2001 From: Adrian Dawid Date: Thu, 13 Aug 2020 11:03:14 +0200 Subject: [PATCH] Add fallback for other backends --- src/recipes.jl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/recipes.jl b/src/recipes.jl index eb4550db..96bad789 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -913,6 +913,21 @@ end @deps pie shape +# --------------------------------------------------------------------------- +# mesh 3d replacement for non-plotly backends + +@recipe function f(::Type{Val{:mesh3d}}, x, y, z; i=nothing,j=nothing,k=nothing) + # As long as no i,j,k are supplied this should work with PyPlot and GR + seriestype := :surface + if i != nothing || j != nothing || k != nothing + throw(ArgumentError("Giving triangles using i,j,k is only supported on Plotly backend.")) + end + () +end + + +# note: don't add dependencies because this really isn't a drop-in replacement + # --------------------------------------------------------------------------- # scatter 3d @@ -928,7 +943,6 @@ end # note: don't add dependencies because this really isn't a drop-in replacement - # --------------------------------------------------------------------------- # lens! - magnify a region of a plot lens!(args...;kwargs...) = plot!(args...; seriestype=:lens, kwargs...)