I am making a plot with a _lot_ of lines. There's no place within the
plot itself that the legend will fit without blocking anything. I
tried to put the legend outside the plot area by passing a tuple to
loc. This worked, but lines that are marked with symbols don't get
any sample line in the legend. That is:
clf(); plot(xs,xs**2, '^',label='data'); legend(loc=(0.8,0.1)); draw()
This works as expected, except the legend is inside the plot area
clf(); plot(xs,xs**2, '^',label='data'); legend(loc=(1.1,0.1)); draw()
This puts the legend in the right place (outside the plot area), but
the area to the left of 'data' in the legend (where the sample line
usually goes) is blank.
clf(); plot(xs,xs**2, '^',label='data'); legend(loc=(0.93,0.1)); draw()
This half draws one of the symbols that make up the sample inside the
legend. This seems to indicate that matplotlib will only draw symbols
when they lie inside a plot.
Is this the intended behavior? How can I get complete sample lines
when the legend lies outside the plot area?