Refactored axis_drawing functions