Check if axis_scales is set before using it