Implement legend placement with set key