From: John H. <jdh...@ac...> - 2004-12-01 14:56:02
|
>>>>> "Jochen" == Jochen Voss <vo...@se...> writes: Jochen> Hello Nicolas Jochen> On Wed, Dec 01, 2004 at 09:34:51AM -0500, Humufr wrote: >> Another strange thing I remark is: >> >> if you are doing: >> >> plot([1,2],[4,5]) legend(('toto')) >> >> the text for the legend is vertical and not horizontal, that's >> work normally when we are using more than one argument. Jochen> This happens because ('toto') is not a one-element list Jochen> but a string. If you write Jochen> plot([1,2],[4,5]) legend(('toto',)) Jochen> instead it works as expected. This is such a common mistake I think we should special case string input for the labels and make it a len(1) tuple if is_string_like(labels): labels = (labels, ) All opposed, say nay! JDH |