Labels on the axis

Can I add text labels (for example on / off) on a continuous axis? The effect I want to achieve is visible in the attachment.