From: John H. <jdh...@ac...> - 2004-11-10 14:45:01
|
>>>>> "Dominique" == Dominique Orban <Dom...@po...> writes: Dominique> However, if I plot only one line, the legend appears Dominique> vertically: >>>> plot( [1,2,3], [4,5,6] ) legend( ( 'line1' ), 'lower right' ) >>>> show() Dominique> Finally, >>>> plot( [1,2,3], [4,5,6] ) legend( ( 'line1', ), 'lower right' >>>> ) show() Dominique> (note the comma after 'line1') produces the horizontal Dominique> text. Dominique> This isn't a big deal, but I am not sure where in Dominique> legend.py I should fix that. This isn't a legend bug exactly, but perhaps legend could detect this common error and warn you. Legend expects a sequence of legend labels. When you pass it 'my label' or equivalently ('my label') you are simply passing it a string which is a length 8 sequence of characters. When you pass it ('my label', ) you are passing a length 1 tuple with a string as the first element. Admittedly legend could be smarter, and just "do what you mean". JDH |