legend position improvement