Merge pull request #1528 from jdeldre/je/fixcontour

Contour plots with x,y in grid (i.e. multi-dimensional array) form
This commit is contained in:
Daniel Schwabeneder 2018-05-18 16:06:08 +02:00 committed by GitHub
commit 11e5a94fc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -634,6 +634,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

View File

@ -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)