Minor update to set_legend() API.