Functions for formatting scales for ggplot2.