Improve display of legend