Patch for legend.py

Hi,

I was creating a legend with the location variable being set to 'best'. However
when my graph contained only one point, the matplotlib code produced an error. I
found that the branch that handles the "one point case" passes the arguments to
the bbox.contains call incorrectly. I am using cvs version of the library.

The following is the patch for the problem: (Note that I edited the installed file)

--- legend.py 2005-05-20 12:18:34.000000000 -0400
+++ /usr/lib/python2.4/site-packages/matplotlib/legend.py 2005-07-21
11:25:08.576508496 -0400
@@ -51,7 +51,7 @@
         return False

     if n == 1:
- return bbox.contains(line[0])
+ return bbox.contains(line[0][0], line[0][1])

     p1 = line[0]
     for p2 in line[1:]:

Best regards,
Maria Khomenko