Refactors axis3d.py to address issue #3610