From 04ba9c9a4e13bc3ad06d01f766fe6b72176943bc Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 1 Feb 2010 07:16:40 +0900 Subject: [PATCH] strip elements out of range in review time graph --- anki/graphs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/anki/graphs.py b/anki/graphs.py index 8b7decbc8..ff2012c0e 100644 --- a/anki/graphs.py +++ b/anki/graphs.py @@ -189,7 +189,8 @@ where type = 1""") fig = Figure(figsize=(self.width, self.height), dpi=self.dpi) times = self.stats['dayTimes'] self.addMissing(times, -days, 0) - times = self.unzip(times.items()) + times = self.unzip([(day,y) for (day,y) in times.items() + if day + days >= 0]) graph = fig.add_subplot(111) self.filledGraph(graph, days, reviewTimeC, *times) graph.set_xlim(xmin=-days, xmax=0)