Grapher: commit patch to allow showdown lines to be removed

But only in source for the moment.

Need to add a Filter for the different graph types
This commit is contained in:
Worros 2010-09-02 15:24:30 +08:00
parent 742dec8b15
commit cc3197b5d1

View File

@ -153,6 +153,11 @@ class GuiGraphViewer (threading.Thread):
siteids = self.filters.getSiteIds()
limits = self.filters.getLimits()
games = self.filters.getGames()
graphs = {
"profit" : True,
"sawShowdown" : True,
"nonShowdown" : True
}
for i in ('show', 'none'):
if i in limits:
@ -230,16 +235,13 @@ class GuiGraphViewer (threading.Thread):
#print "No hands returned by graph query"
else:
self.ax.set_title(_("Profit graph for ring games"))
#text = "Profit: $%.2f\nTotal Hands: %d" %(green[-1], len(green))
#self.ax.annotate(text,
# xy=(10, -10),
# xycoords='axes points',
# horizontalalignment='left', verticalalignment='top',
# fontsize=10)
#Draw plot
if graphs['profit'] == True:
self.ax.plot(green, color='green', label=_('Hands: %d\nProfit: $%.2f') %(len(green), green[-1]))
if graphs['sawShowdown'] == True:
self.ax.plot(blue, color='blue', label=_('Showdown: $%.2f') %(blue[-1]))
if graphs['nonShowdown'] == True:
self.ax.plot(red, color='red', label=_('Non-showdown: $%.2f') %(red[-1]))
if sys.version[0:3] == '2.5':
self.ax.legend(loc='upper left', shadow=True, prop=FontProperties(size='smaller'))