%% Specify Custom Legend Size and Location
% Define the data. 
%%

% Copyright 2015 The MathWorks, Inc.

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

x2 = 2*sin(theta);
y2 = 2*cos(theta);

%%
% Create a scatter plot of two circles. Use |axis equal| to set equal
% scaling along both the _x_-axis and _y_-axis.

figure
scatter(x1,y1)
hold on
scatter(x2,y2,'*g')
hold off
axis equal

%%
% Add a legend to the center of the graph using the |Position| property.
% To set the |Position| property when
% creating a legend, you must define the legend strings as a
% cell array by using curly braces, |{}|.


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

