Adding functionality to draw ticks and labels