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:
parent
742dec8b15
commit
cc3197b5d1
|
@ -153,6 +153,11 @@ class GuiGraphViewer (threading.Thread):
|
||||||
siteids = self.filters.getSiteIds()
|
siteids = self.filters.getSiteIds()
|
||||||
limits = self.filters.getLimits()
|
limits = self.filters.getLimits()
|
||||||
games = self.filters.getGames()
|
games = self.filters.getGames()
|
||||||
|
graphs = {
|
||||||
|
"profit" : True,
|
||||||
|
"sawShowdown" : True,
|
||||||
|
"nonShowdown" : True
|
||||||
|
}
|
||||||
|
|
||||||
for i in ('show', 'none'):
|
for i in ('show', 'none'):
|
||||||
if i in limits:
|
if i in limits:
|
||||||
|
@ -230,16 +235,13 @@ class GuiGraphViewer (threading.Thread):
|
||||||
#print "No hands returned by graph query"
|
#print "No hands returned by graph query"
|
||||||
else:
|
else:
|
||||||
self.ax.set_title(_("Profit graph for ring games"))
|
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
|
#Draw plot
|
||||||
|
if graphs['profit'] == True:
|
||||||
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]))
|
||||||
|
if graphs['sawShowdown'] == True:
|
||||||
self.ax.plot(blue, color='blue', label=_('Showdown: $%.2f') %(blue[-1]))
|
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]))
|
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='upper left', shadow=True, prop=FontProperties(size='smaller'))
|
self.ax.legend(loc='upper left', shadow=True, prop=FontProperties(size='smaller'))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user