fill([0 1 1], [0 1 0], [.9 .9 .9]); hold on
plot(rand(5, 1), 'b');
plot(rand(5, 1), 'r');
plot(rand(5, 1), 'g'); hold off
h = legend('fill', 'line one', 'line two', 'line three');
%
hLegendLines = findobj(h, 'type', 'line', '-and', '-regexp','Tag','[^'']');
set(hLegendLines, 'XData', [.2, .3])
%
hLegendPatch = findobj(h, 'type', 'patch');
set(hLegendPatch, 'XData', [.2, .2, .3, .3])
EDIT : (response to comments)
You can manipulate the size of the legend by setting the property Position. Nevertheless, it seems that the legend is as large as possible in terms of content, so you can make it bigger, but not smaller (try changing it with the mouse):
p = get(h,'Position'); p(3)=0.1;
set(h, 'Position',p);

Another way is to reduce the font size used for labels:
h = legend('fill', 'line one', 'line two', 'line three')
set(h, 'FontSize',6); %
