Grapher/Filters: Fix graph labels and whitespace
Remove some trailing whitespace from Antistffs patch. Change format of Graph labels from: Blah: $0.00 or Blah 0.00BB to Blah($|BB): 0.00
This commit is contained in:
parent
126eb0c0bc
commit
a125e77135
|
@ -146,11 +146,6 @@ class GuiGraphViewer (threading.Thread):
|
||||||
limits = self.filters.getLimits()
|
limits = self.filters.getLimits()
|
||||||
games = self.filters.getGames()
|
games = self.filters.getGames()
|
||||||
graphops = self.filters.getGraphOps()
|
graphops = self.filters.getGraphOps()
|
||||||
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:
|
||||||
|
@ -232,27 +227,11 @@ class GuiGraphViewer (threading.Thread):
|
||||||
self.ax.set_title(_("Profit graph for ring games"))
|
self.ax.set_title(_("Profit graph for ring games"))
|
||||||
|
|
||||||
#Draw plot
|
#Draw plot
|
||||||
# this if is only to switch the dollar sign in the labels
|
self.ax.plot(green, color='green', label=_('Hands: %d\nProfit (%s): %.2f') %(len(green),graphops['dspin'], green[-1]))
|
||||||
# since one goes in the front and one goes in back i cant think of a better
|
|
||||||
# way to do it.
|
|
||||||
if graphops['dspin'] == '$':
|
|
||||||
if graphs['profit'] == True:
|
|
||||||
self.ax.plot(green, color='green', label=_('Hands: %d\nProfit: $%.2f') %(len(green),green[-1]))
|
|
||||||
if graphops['showdown'] == 'ON':
|
if graphops['showdown'] == 'ON':
|
||||||
if graphs['sawShowdown'] == True:
|
self.ax.plot(blue, color='blue', label=_('Showdown (%s): %.2f') %(graphops['dspin'], blue[-1]))
|
||||||
self.ax.plot(blue, color='blue', label=_('Showdown: $%.2f') %(blue[-1]))
|
|
||||||
if graphops['nonshowdown'] == 'ON':
|
if graphops['nonshowdown'] == 'ON':
|
||||||
if graphs['nonShowdown'] == True:
|
self.ax.plot(red, color='red', label=_('Non-showdown (%s): %.2f') %(graphops['dspin'], red[-1]))
|
||||||
self.ax.plot(red, color='red', label=_('Non-showdown: $%.2f') %(red[-1]))
|
|
||||||
elif graphops['dspin'] == 'BB':
|
|
||||||
if graphs['profit'] == True:
|
|
||||||
self.ax.plot(green, color='green', label=_('Hands: %d\nProfit: %.2fBB') %(len(green),green[-1]))
|
|
||||||
if graphops['showdown'] == 'ON':
|
|
||||||
if graphs['sawShowdown'] == True:
|
|
||||||
self.ax.plot(blue, color='blue', label=_('Showdown: %.2fBB') %(blue[-1]))
|
|
||||||
if graphops['nonshowdown'] == 'ON':
|
|
||||||
if graphs['nonShowdown'] == True:
|
|
||||||
self.ax.plot(red, color='red', label=_('Non-showdown: %.2fBB') %(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'))
|
||||||
|
@ -270,11 +249,6 @@ class GuiGraphViewer (threading.Thread):
|
||||||
#end of def showClicked
|
#end of def showClicked
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def getRingProfitGraph(self, names, sites, limits, games, units):
|
def getRingProfitGraph(self, names, sites, limits, games, units):
|
||||||
# tmp = self.sql.query['getRingProfitAllHandsPlayerIdSite']
|
# tmp = self.sql.query['getRingProfitAllHandsPlayerIdSite']
|
||||||
# print "DEBUG: getRingProfitGraph"
|
# print "DEBUG: getRingProfitGraph"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user