allow legend box to work in python 2.5

This commit is contained in:
sqlcoder 2009-12-03 20:20:42 +00:00
parent 9dd09fe8a1
commit cd65aae374

View File

@ -196,6 +196,9 @@ class GuiGraphViewer (threading.Thread):
self.ax.plot(green, color='green', label='Hands: %d\nProfit: $%.2f' %(len(green), green[-1])) self.ax.plot(green, color='green', label='Hands: %d\nProfit: $%.2f' %(len(green), green[-1]))
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':
self.ax.legend(loc='best', shadow=True, prop=FontProperties(size='smaller'))
else:
self.ax.legend(loc='best', fancybox=True, shadow=True, prop=FontProperties(size='smaller')) self.ax.legend(loc='best', fancybox=True, shadow=True, prop=FontProperties(size='smaller'))