From f792aea98efa4fb593aa308fdbfdb95a1eccd782 Mon Sep 17 00:00:00 2001 From: Jeff Eldredge Date: Wed, 16 May 2018 11:19:10 -0700 Subject: [PATCH] Changed treatment of contour types, to allow for x,y in grid form, allowed by PyPlot backend --- src/backends/pyplot.jl | 6 ++++++ src/pipeline.jl | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/backends/pyplot.jl b/src/backends/pyplot.jl index cdf63b46..7e5924c3 100644 --- a/src/backends/pyplot.jl +++ b/src/backends/pyplot.jl @@ -638,6 +638,12 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series) if st in (:contour, :contour3d) z = transpose_z(series, z.surf) + if typeof(x)<:Plots.Surface + x = Plots.transpose_z(series, x.surf) + end + if typeof(y)<:Plots.Surface + y = Plots.transpose_z(series, y.surf) + end if st == :contour3d extrakw[:extend3d] = true diff --git a/src/pipeline.jl b/src/pipeline.jl index 931aa76e..66e8c7f1 100644 --- a/src/pipeline.jl +++ b/src/pipeline.jl @@ -327,7 +327,7 @@ end function _override_seriestype_check(d::KW, st::Symbol) # do we want to override the series type? - if !is3d(st) + if !is3d(st) && !(st in (:contour,:contour3d)) z = d[:z] if !isa(z, Void) && (size(d[:x]) == size(d[:y]) == size(z)) st = (st == :scatter ? :scatter3d : :path3d)