Display legend inside axis

If  is checked, the legend list is displayed within the axis  as shown below.

 

If it is outside the plot, it looks like below.