Browse Source

Fix bottom kwarg for p3.

tags/v0.1^2
Ben Kurtovic 13 years ago
parent
commit
bb6e8f1063
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      bot/tasks/afc_history.py

+ 2
- 1
bot/tasks/afc_history.py View File

@@ -171,6 +171,7 @@ class Task(BaseTask):
pends = [d[STATUS_PEND] for d in data.itervalues()] pends = [d[STATUS_PEND] for d in data.itervalues()]
declines = [d[STATUS_DECLINE] for d in data.itervalues()] declines = [d[STATUS_DECLINE] for d in data.itervalues()]
accepts = [d[STATUS_ACCEPT] for d in data.itervalues()] accepts = [d[STATUS_ACCEPT] for d in data.itervalues()]
pends_declines = [p + d for p, d in zip(pends, declines)]
ind = arange(len(data)) ind = arange(len(data))
xsize = self.graph.get("xsize", 1200) xsize = self.graph.get("xsize", 1200)
ysize = self.graph.get("xsize", 900) ysize = self.graph.get("xsize", 900)
@@ -182,7 +183,7 @@ class Task(BaseTask):


p1 = plt.bar(ind, pends, width, color=pcolor) p1 = plt.bar(ind, pends, width, color=pcolor)
p2 = plt.bar(ind, declines, width, color=dcolor, bottom=pends) p2 = plt.bar(ind, declines, width, color=dcolor, bottom=pends)
p3 = plt.bar(ind, accepts, width, color=acolor, bottom=pends+declines)
p3 = plt.bar(ind, accepts, width, color=acolor, bottom=pends_declines)


plt.title("AfC submissions per date") plt.title("AfC submissions per date")
plt.ylabel("Submissions") plt.ylabel("Submissions")


Loading…
Cancel
Save