Hi there! I've been using the legend function in a plot but
> can't get the location setting to work. I've tried the
> numeric and string versions of the location codes and tried
> several backends (but only winXP, python 2.3.3). The legend
> always appears upper-right.
> Is this functionality platform-dependent?
No, in the 2 arg version legend(LABELS, LOC), the loc argument must be
a position arg, not be a kwarg. Ie,
plots.legend( ('test', ), 4)
works. Note that the labels argument needs to be a list or tuple, not
a string as you gave, but this is not related to your problem.
The problem you experienced was due to the inadequate way I was using
introspection to determine which of the many call signatures legend
has. There is an easy fix which gets it right in the case where loc
is a kwarg.
In axes.Aces.legend, replace
loc = 1
with
loc = kwargs.get('loc', 1)
as the first line after the doc string.
Hope this helps,
JDH