Skip to content

Commit

Permalink
replaced gca(projection="3d") with plt.axes(projection="3d") (#533)
Browse files Browse the repository at this point in the history
* replaced gca(projection="3d") with plt.axes(projection="3d") as needed for matplotlib 3.4.2

* added an alias for gca() depending on the PyPlot vers.

* added an alias for gca() depending on the PyPlot vers.

* replaced the alias with direct call at the right places

* changed to proposed solution with quote "subplot"

* corrected indentation to use spaces instead of tabs

* Delete settings.json

removed the settings.json from vscode.

* Update src/plot3d.jl

* Update src/plot3d.jl

Co-authored-by: Steven G. Johnson <[email protected]>
  • Loading branch information
stakaz and stevengj authored Sep 13, 2021
1 parent 52a83c8 commit 4da0d5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plot3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ for f in mplot3d_funcs
fs = string(f)
@eval @doc LazyHelp(axes3D,"Axes3D", $fs) function $f(args...; kws...)
using3D() # make sure mplot3d is loaded
ax = gca(projection="3d")
ax = PyPlot.version <= v"3.4" ? gca(projection="3d") : plt."subplot"(projection="3d")
pycall(ax.$fs, PyAny, args...; kws...)
end
end
Expand All @@ -74,7 +74,7 @@ for f in zlabel_funcs
fs = string("set_", f)
@eval @doc LazyHelp(axes3D,"Axes3D", $fs) function $f(args...; kws...)
using3D() # make sure mplot3d is loaded
ax = gca(projection="3d")
ax = PyPlot.version <= v"3.4" ? gca(projection="3d") : plt."subplot"(projection="3d")
pycall(ax.$fs, PyAny, args...; kws...)
end
end
Expand Down

0 comments on commit 4da0d5d

Please sign in to comment.