pyplot surface fix

This commit is contained in:
Thomas Breloff 2016-03-17 08:59:43 -04:00
parent 3d4d844e72
commit 1d1e1beca5

View File

@ -300,12 +300,14 @@ function _add_series(pkg::PyPlotBackend, plt::Plot; kw...)
# handle mismatched x/y sizes, as PyPlot doesn't like that # handle mismatched x/y sizes, as PyPlot doesn't like that
x, y = d[:x], d[:y] x, y = d[:x], d[:y]
if !isa(get(d, :z, nothing), Surface)
nx, ny = map(length, (x,y)) nx, ny = map(length, (x,y))
if nx < ny if nx < ny
d[:x] = Float64[x[mod1(i,nx)] for i=1:ny] d[:x] = Float64[x[mod1(i,nx)] for i=1:ny]
else else
d[:y] = Float64[y[mod1(i,ny)] for i=1:nx] d[:y] = Float64[y[mod1(i,ny)] for i=1:nx]
end end
end
ax = getAxis(plt, d[:axis]) ax = getAxis(plt, d[:axis])
if !(lt in supportedTypes(pkg)) if !(lt in supportedTypes(pkg))