reformat legend