Skip to content

Commit 4da0d5d

Browse files
stakazstevengj
andauthored
replaced gca(projection="3d") with plt.axes(projection="3d") (#533)
* 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]>
1 parent 52a83c8 commit 4da0d5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plot3d.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ for f in mplot3d_funcs
5858
fs = string(f)
5959
@eval @doc LazyHelp(axes3D,"Axes3D", $fs) function $f(args...; kws...)
6060
using3D() # make sure mplot3d is loaded
61-
ax = gca(projection="3d")
61+
ax = PyPlot.version <= v"3.4" ? gca(projection="3d") : plt."subplot"(projection="3d")
6262
pycall(ax.$fs, PyAny, args...; kws...)
6363
end
6464
end
@@ -74,7 +74,7 @@ for f in zlabel_funcs
7474
fs = string("set_", f)
7575
@eval @doc LazyHelp(axes3D,"Axes3D", $fs) function $f(args...; kws...)
7676
using3D() # make sure mplot3d is loaded
77-
ax = gca(projection="3d")
77+
ax = PyPlot.version <= v"3.4" ? gca(projection="3d") : plt."subplot"(projection="3d")
7878
pycall(ax.$fs, PyAny, args...; kws...)
7979
end
8080
end

0 commit comments

Comments
 (0)