Deduplicate legend entries