From c258bc49c390475458e0f3a9760f05a03a6eaafd Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Sun, 10 Jul 2016 22:07:00 -0400 Subject: [PATCH] gr trisurface; closes #387 --- src/backends/gr.jl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/backends/gr.jl b/src/backends/gr.jl index 3546a1f1..d4432999 100644 --- a/src/backends/gr.jl +++ b/src/backends/gr.jl @@ -639,7 +639,8 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas) frng = series[:fillrange] # recompute data - if st in (:contour, :surface, :wireframe) + if typeof(z) <: Surface + # if st in (:contour, :surface, :wireframe) z = vec(transpose_z(series, z.surf, false)) elseif ispolar(sp) if frng != nothing @@ -705,7 +706,11 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas) elseif st in [:surface, :wireframe] if st == :surface - GR.gr3.surface(x, y, z, GR.OPTION_COLORED_MESH) + if length(x) == length(y) == length(z) + GR.trisurface(x, y, z) + else + GR.gr3.surface(x, y, z, GR.OPTION_COLORED_MESH) + end else GR.setfillcolorind(0) GR.surface(x, y, z, GR.OPTION_FILLED_MESH)