Fixed orientation and improved drawAxis function