refined the display of legend text