I would like to draw some text behind a Poly3DCollection
object, unfortunately using the zorder
keyword doesn't seem to produce the effect requested.
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
from matplotlib.pyplot import figure, show
canvas = figure()
axes = Axes3D(canvas)
axes.text(0.5, 0.5, 0.5, 'I would like to be behind!', 'x', zorder=0)
x = [0, 1, 1, 0]
y = [0, 0, 0.5, 0.5]
z = [0, 0, 1, 1]
axes.add_collection3d(Poly3DCollection([zip(x, y, z)], zorder=1))
show()