Make it work in practice

This commit is contained in:
Adrian Dawid 2020-08-11 01:14:35 +02:00
parent 3160795f21
commit 6d9f224c74
3 changed files with 14 additions and 3 deletions

View File

@ -38,7 +38,7 @@ const _axesAliases = Dict{Symbol,Symbol}(
)
const _3dTypes = [
:path3d, :scatter3d, :surface, :wireframe, :contour3d, :volume
:path3d, :scatter3d, :surface, :wireframe, :contour3d, :volume, :mesh3d
]
const _allTypes = vcat([
:none, :line, :path, :steppre, :steppost, :sticks, :scatter,

View File

@ -328,11 +328,15 @@ end
function _override_seriestype_check(plotattributes::AKW, st::Symbol)
# do we want to override the series type?
println(RecipesPipeline.is3d(st))
println(st)
if !RecipesPipeline.is3d(st) && !(st in (:contour, :contour3d))
z = plotattributes[:z]
if !isa(z, Nothing) &&
(size(plotattributes[:x]) == size(plotattributes[:y]) == size(z))
(size(plotattributes[:x]) == size(plotattributes[:y]) == size(z)) &&
st !== :mesh3d
st = (st == :scatter ? :scatter3d : :path3d)
println("hello hello hello")
plotattributes[:seriestype] = st
end
end

View File

@ -1536,3 +1536,10 @@ julia> areaplot(1:3, [1 2 3; 7 8 9; 4 5 6], seriescolor = [:red :green :blue], f
end
is_3d(::Type{Val{:mesh3d}}) = true
# ---------------------------------------------------------------------------
# mesh 3d
@recipe function f(::Type{Val{:mesh3d}}, x, y, z)
seriestype := :mesh3d
()
end