f1=figure;h_axes=gca;
h1=plot(0,0,'ok'); hold on;
h2=plot(0,0,'ob');
h3=plot(0,0,'ok','MarkerFaceColor','k');
h4=plot(0,0,'or','MarkerFaceColor','r'); hold off;xlim(1:2);
line_handles = [h1, h2, h3, h4];
t1 = 'Previously localized sensors';
t2 = ['Previously localized sensors', sprintf('\n'),...
'being used to locate the next sensor'];
t3 = ['Sensors of unknown location'];
t4 = ['Sensor whose location we' sprintf('\n') 'are presently determining'];
legend_texts = {t1, t2, t3, t4};
h_leg = legend(line_handles, legend_texts);
h_axes.Visible='off';
legend(h_axes,'boxon');
legend(h_axes,'show');
h_leg.FontSize = 22.5;
h_leg.Location = 'bestoutside';
f2=figure;objects=allchild(f1);copyobj(get(f1,'children'),f2);
HeightScaleFactor = 1.5;
NewHeight = h_leg.Position(4) * HeightScaleFactor;
h_leg.Position(2) = h_leg.Position(2) - (NewHeight - h_leg.Position(4));
h_leg.Position(4) = NewHeight;