Incorporated changes from http://bazaar.launchpad.net/~mrooney/cairoplot/label-formatters/revision/49