surface fix

This commit is contained in:
Thomas Breloff 2016-03-19 19:40:27 -06:00
parent 1f1ccd81bb
commit 1636587a82
2 changed files with 3 additions and 2 deletions

View File

@ -458,7 +458,7 @@ function _add_series(pkg::PyPlotBackend, plt::Plot; kw...)
handle
elseif lt in (:surface,:wireframe)
x, y, z = d[:x], d[:y], Array(d[:z])
x, y, z = Array(d[:x]), Array(d[:y]), Array(d[:z])
if !ismatrix(x) || !ismatrix(y)
x = repmat(x', length(y), 1)
y = repmat(y, 1, length(d[:x]))

View File

@ -310,7 +310,8 @@ end
# surfaces-like... general x, y grid
function process_inputs{T<:Number}(plt::AbstractPlot, d::KW, x::AMat{T}, y::AMat{T}, zmat::AMat{T})
@assert size(zmat) == size(x) == size(y)
d[:x], d[:y], d[:z] = Any[x], Any[y], Surface{Matrix{Float64}}(zmat)
# d[:x], d[:y], d[:z] = Any[x], Any[y], Surface{Matrix{Float64}}(zmat)
d[:x], d[:y], d[:z] = map(Surface{Matrix{Float64}}, (x, y, zmat))
if !like_surface(get(d, :linetype, :none))
d[:linetype] = :contour
end