change legend position in graph, 'best' seems to use top right for me sometimes when upper left seems the obvious place to put it

This commit is contained in:
sqlcoder 2010-06-11 21:09:04 +01:00
parent bf5f24fb6b
commit 7205ac78d3

View File

@ -228,9 +228,9 @@ class GuiGraphViewer (threading.Thread):
self.ax.plot(blue, color='blue', label='Showdown: $%.2f' %(blue[-1])) self.ax.plot(blue, color='blue', label='Showdown: $%.2f' %(blue[-1]))
self.ax.plot(red, color='red', label='Non-showdown: $%.2f' %(red[-1])) self.ax.plot(red, color='red', label='Non-showdown: $%.2f' %(red[-1]))
if sys.version[0:3] == '2.5': if sys.version[0:3] == '2.5':
self.ax.legend(loc='best', shadow=True, prop=FontProperties(size='smaller')) self.ax.legend(loc='upper left', shadow=True, prop=FontProperties(size='smaller'))
else: else:
self.ax.legend(loc='best', fancybox=True, shadow=True, prop=FontProperties(size='smaller')) self.ax.legend(loc='upper left', fancybox=True, shadow=True, prop=FontProperties(size='smaller'))
self.graphBox.add(self.canvas) self.graphBox.add(self.canvas)
self.canvas.show() self.canvas.show()