Formatting of legend