add mesh3d support (#3076)
* add mesh3d support * correct example string
This commit is contained in:
parent
c7955420e3
commit
e236005d72
@ -818,6 +818,7 @@ const _pgfplotsx_seriestype = [
|
|||||||
:surface,
|
:surface,
|
||||||
:wireframe,
|
:wireframe,
|
||||||
:heatmap,
|
:heatmap,
|
||||||
|
:mesh3d,
|
||||||
:contour,
|
:contour,
|
||||||
:contour3d,
|
:contour3d,
|
||||||
:quiver,
|
:quiver,
|
||||||
|
|||||||
@ -527,6 +527,17 @@ function pgfx_add_series!(::Val{:heatmap}, axis, series_opt, series, series_func
|
|||||||
pgfx_add_legend!(axis, series, opt)
|
pgfx_add_legend!(axis, series, opt)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function pgfx_add_series!(::Val{:mesh3d}, axis, series_opt, series, series_func, opt)
|
||||||
|
ptable = join([ string(i, " ", j, " ", k, "\\\\") for (i, j, k) in zip(opt[:connections]...) ], "\n ")
|
||||||
|
push!(
|
||||||
|
series_opt,
|
||||||
|
"patch" => nothing,
|
||||||
|
"table/row sep" => "\\\\",
|
||||||
|
"patch table" => ptable
|
||||||
|
)
|
||||||
|
pgfx_add_series!(axis, series_opt, series, series_func, opt)
|
||||||
|
end
|
||||||
|
|
||||||
function pgfx_add_series!(::Val{:contour}, axis, series_opt, series, series_func, opt)
|
function pgfx_add_series!(::Val{:contour}, axis, series_opt, series, series_func, opt)
|
||||||
push!(axis.options, "view" => "{0}{90}")
|
push!(axis.options, "view" => "{0}{90}")
|
||||||
if isfilledcontour(series)
|
if isfilledcontour(series)
|
||||||
|
|||||||
@ -1000,8 +1000,8 @@ const _examples = PlotExample[
|
|||||||
"Mesh3d",
|
"Mesh3d",
|
||||||
"""
|
"""
|
||||||
Allows to plot arbitrary 3d meshes. If only x,y,z are given the mesh is generated automatically.
|
Allows to plot arbitrary 3d meshes. If only x,y,z are given the mesh is generated automatically.
|
||||||
You can also specify the connections using the connections keyword. This is only supported on the Plotly backend.
|
You can also specify the connections using the connections keyword.
|
||||||
The connections are specified using a tuple of vectors. Each vector contains the 0-based indices of one point of a triangle,
|
The connections are specified using a tuple of vectors. Each vector contains the 0-based indices of one point of a triangle,
|
||||||
such that elements at the same position of these vectors form a triangle.
|
such that elements at the same position of these vectors form a triangle.
|
||||||
""",
|
""",
|
||||||
[
|
[
|
||||||
@ -1076,16 +1076,13 @@ _backend_skips = Dict(
|
|||||||
:pyplot => [2, 25, 30, 31, 47, 49],
|
:pyplot => [2, 25, 30, 31, 47, 49],
|
||||||
:plotlyjs => [2, 21, 24, 25, 30, 31, 49],
|
:plotlyjs => [2, 21, 24, 25, 30, 31, 49],
|
||||||
:plotly => [2, 21, 24, 25, 30, 31, 49],
|
:plotly => [2, 21, 24, 25, 30, 31, 49],
|
||||||
:pgfplots => [2, 5, 6, 10, 16, 20, 22, 23, 25, 28, 30, 31, 34, 37, 38, 39, 47],
|
|
||||||
:pgfplotsx => [
|
:pgfplotsx => [
|
||||||
2, # animation
|
2, # animation
|
||||||
6, # images
|
6, # images
|
||||||
16, # pgfplots thinks the upper panel is too small
|
16, # pgfplots thinks the upper panel is too small
|
||||||
25, # @df
|
|
||||||
30, # @df
|
30, # @df
|
||||||
31, # animation
|
31, # animation
|
||||||
32, # spy
|
32, # spy
|
||||||
47, # mesh3
|
|
||||||
49, # polar heatmap
|
49, # polar heatmap
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user