matplotlib/matplotlib — pull request #1864 by leejjoon (2013-03-28 03:01:06+00:00)
Title: fix legend w/ 'expand' mode which fails for a single item.

The problem is originally reported in the mailing list.

http://matplotlib.1069221.n5.nabble.com/Trouble-with-legend-and-axis-scaling-tp40745.html

Basically, the legend "expand" mode fails when there is one item to show.
The PR fixes this problem.