%% Specify Custom Legend Size and Location
% Combine two scatter plots. Use axis equal to set equal scaling along both the x-axis and y-axis. Add a legend to the center of the axes by specifying the Position property. To set the Position property when creating a legend, define the legend labels as a cell array by using curly braces, {}.

theta = linspace(0,2*pi,100);
x1 = sin(theta);
y1 = cos(theta);
scatter(x1,y1)

x2 = 2*sin(theta);
y2 = 2*cos(theta);
hold on
scatter(x2,y2,'*g')
hold off
axis equal

legend({'radius = 1','radius = 2'},'Position',[0.39,0.45,0.25,0.1])

% Copyright 2012 The MathWorks, Inc.