adjust position of the legend