Skip to content

Commit a4deff6

Browse files
committed
return-type fixes for axis, fill
1 parent 746033b commit a4deff6

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎src/PythonPlot.jl‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ for f in plt_funcs
180180
end
181181
end
182182

183+
# convert axis(...) return value to Julia Float64 tuple
184+
@doc LazyHelp(pyplot,"axis") function axis(args...; kws...)
185+
return pyconvert(NTuple{4,Float64}, pycall(pyplot."axis", args...; kws...))
186+
end
187+
183188
# rename to avoid type piracy:
184189
@doc LazyHelp(pyplot,"step") plotstep(x, y; kws...) = pycall(pyplot.step, x, y; kws...)
185190

@@ -199,7 +204,7 @@ plotclose(f::AbstractString) = pyplot.close(f)
199204

200205
# rename to avoid type piracy:
201206
@doc LazyHelp(pyplot,"fill") plotfill(x::AbstractArray,y::AbstractArray, args...; kws...) =
202-
pycall(pyplot.fill, PyAny, x, y, args...; kws...)
207+
pycall(pyplot.fill, x, y, args...; kws...)
203208

204209
# consistent capitalization with mplot3d
205210
@doc LazyHelp(pyplot,"hist2d") hist2D(args...; kws...) = pycall(pyplot.hist2d, args...; kws...)

0 commit comments

Comments
 (0)