Move Spines in 3d Pyplot

The following code is translated from Python where the last three lines move the spines:

t = 0:0.1:2π
x = sin.(t);
y = cos.(t);

fig=figure()
using3D()
ax = fig.add_subplot(111,projection="3d")

ax.plot(x,y,t);

ax.xaxis._axinfo["juggled"] = (0,0,0)
ax.yaxis._axinfo["juggled"] = (1,1,1)
ax.zaxis._axinfo["juggled"] = (2,0,1)

In Julia, the Spines don’t change. What am I doing wrong?

Use

using PyCall
set!(ax."xaxis"."_axinfo", "juggled", (0,0,0))

to prevent ax.zaxis._axinfo from being converted to a native Julia object before assignment.

2 Likes