This evening i played a bit with trying to add
a legend to a plot widget that i have.
Here is the relevant test code snippet
(based on the example: embedding_in_wx.py)
def plotMultiYData(self, xList, yLists, xRangeList, yRangeList):
a = self.figmgr.add_subplot(111)
x = self.__listToFloatArray(xList)
for yList in yLists:
y = self.__listToFloatArray(yList)
a.plot(x,y, marker='o', markersize=4.0)
a.legend(('aLabel'), 'upper center')
# End of: for yList in yLists:
The aLabel gets printed like:
and the first plot associates with the first 'a'
the second with the 'L' etc. Clearly at the moment
i'm only trying to apply a legend to the first plot.
Once i get that sorted out i would expect
('legend1', legend2') to work for 2 plots etc.
Anyone want to give me a hint as to what i'm doing wrong here?
I would really like to specify that the legend appear
off of the plot...say to the left of the y axis tick
marks...any hints here?