fig = plt.figure()
ax = Axes3D(fig, auto_add_to_figure=False)
fig.add_axes(ax)
ax.plot([0, 1], [1, 0], [-1, 1])
yields (borders added manually)
Adding
for anm in ('x', 'y', 'z'):
getattr(ax, f'set_{anm}ticks')([])
getattr(ax, f'w_{anm}axis').set_pane_color((1, 1, 1, 0))
getattr(ax, f'w_{anm}axis').line.set_color((1, 1, 1, 0))
getattr(ax, f'set_{anm}margin')(0)
I get what's on left, but I seek what's on right
How can this be accomplished? Full code
I seek a native solution (no save-stage post-processing, or third party libraries), as the figure is processed further natively in matplotlib (specifically in an animation). Ideally the solution is general-purpose, i.e. not specific to Axes3D.
To test the answer, it should produce the following output in full context code, as a .mp4 (I got this output with manual post-processing):