Add support for arbitrary 3d mesh
This commit is contained in:
parent
60e80e93cf
commit
71910c2d70
@ -574,11 +574,19 @@ function plotly_series(plt::Plot, series::Series)
|
||||
elseif st == :mesh3d
|
||||
plotattributes_out[:type] = "mesh3d"
|
||||
plotattributes_out[:x], plotattributes_out[:y], plotattributes_out[:z] = x, y, z
|
||||
plotattributes_out[:colorscale] = plotly_colorscale(series[:fillcolor], series[:fillalpha])
|
||||
|
||||
if :i in keys(series[:extra_kwargs]) && :j in keys(series[:extra_kwargs]) && :k in keys(series[:extra_kwargs])
|
||||
plotattributes_out[:i] = series[:extra_kwargs][:i]
|
||||
plotattributes_out[:j] = series[:extra_kwargs][:j]
|
||||
plotattributes_out[:k] = series[:extra_kwargs][:k]
|
||||
end
|
||||
|
||||
plotattributes_out[:colorscale] = plotly_colorscale(series[:fillcolor], series[:fillalpha])
|
||||
plotattributes_out[:opacity] = series[:fillalpha]
|
||||
if series[:fill_z] !== nothing
|
||||
plotattributes_out[:surfacecolor] = plotly_surface_data(series, series[:fill_z])
|
||||
end
|
||||
plotattributes_out[:showscale] = false
|
||||
else
|
||||
@warn("Plotly: seriestype $st isn't supported.")
|
||||
return KW()
|
||||
|
||||
@ -1536,10 +1536,3 @@ 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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user