gr: added support for volume plots

This commit is contained in:
Josef Heinen 2019-02-16 18:03:21 +01:00
parent b58082a37b
commit 8f30696a4d
2 changed files with 6 additions and 1 deletions

View File

@ -351,7 +351,7 @@ const _gr_attr = merge_with_base_supported([
const _gr_seriestype = [ const _gr_seriestype = [
:path, :scatter, :straightline, :path, :scatter, :straightline,
:heatmap, :pie, :image, :heatmap, :pie, :image,
:contour, :path3d, :scatter3d, :surface, :wireframe, :contour, :path3d, :scatter3d, :surface, :wireframe, :volume,
:shape :shape
] ]
const _gr_style = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot] const _gr_style = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot]

View File

@ -1067,6 +1067,11 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
GR.surface(x, y, z, GR.OPTION_FILLED_MESH) GR.surface(x, y, z, GR.OPTION_FILLED_MESH)
end end
elseif st == :volume
sp[:legend] = :none
GR.gr3.clear()
dmin, dmax = GR.gr3.volume(y.v, 0)
elseif st == :heatmap elseif st == :heatmap
xmin, xmax, ymin, ymax = xy_lims xmin, xmax, ymin, ymax = xy_lims
zmin, zmax = clims zmin, zmax = clims