mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
remove labels from graphs, they don't support foreign text
This commit is contained in:
parent
89591073de
commit
82870a9a19
1 changed files with 2 additions and 11 deletions
|
@ -96,15 +96,13 @@ from cards where type = 1 and priority in (1,2,3,4) and interval > 21""")
|
||||||
self.filledGraph(graph, days, ["#7777ff", "#77ffff"], *argl)
|
self.filledGraph(graph, days, ["#7777ff", "#77ffff"], *argl)
|
||||||
|
|
||||||
cheat = fig.add_subplot(111)
|
cheat = fig.add_subplot(111)
|
||||||
b1 = cheat.bar(0, 0, color = "#77ffff") #, label = _("Young cards"))
|
b1 = cheat.bar(0, 0, color = "#77ffff")
|
||||||
b2 = cheat.bar(1, 0, color = "#7777ff") #, label = _("Mature cards"))
|
b2 = cheat.bar(1, 0, color = "#7777ff")
|
||||||
|
|
||||||
cheat.legend([b1, b2], [
|
cheat.legend([b1, b2], [
|
||||||
_("Young"),
|
_("Young"),
|
||||||
_("Mature")], loc='upper right')
|
_("Mature")], loc='upper right')
|
||||||
|
|
||||||
graph.set_ylabel(_("Cards"))
|
|
||||||
graph.set_xlabel(_("Days"))
|
|
||||||
graph.set_xlim(xmin=self.stats['lowestInDay'], xmax=days)
|
graph.set_xlim(xmin=self.stats['lowestInDay'], xmax=days)
|
||||||
return fig
|
return fig
|
||||||
|
|
||||||
|
@ -125,8 +123,6 @@ from cards where type = 1 and priority in (1,2,3,4) and interval > 21""")
|
||||||
x = list(x); x.append(99999)
|
x = list(x); x.append(99999)
|
||||||
y.append(count)
|
y.append(count)
|
||||||
self.filledGraph(graph, days, "#aaaaff", x, y)
|
self.filledGraph(graph, days, "#aaaaff", x, y)
|
||||||
graph.set_ylabel(_("Cards"))
|
|
||||||
graph.set_xlabel(_("Days"))
|
|
||||||
graph.set_xlim(xmin=self.stats['lowestInDay'], xmax=days)
|
graph.set_xlim(xmin=self.stats['lowestInDay'], xmax=days)
|
||||||
graph.set_ylim(ymax=count+100)
|
graph.set_ylim(ymax=count+100)
|
||||||
return fig
|
return fig
|
||||||
|
@ -139,8 +135,6 @@ from cards where type = 1 and priority in (1,2,3,4) and interval > 21""")
|
||||||
intervals = self.unzip(ints.items())
|
intervals = self.unzip(ints.items())
|
||||||
graph = fig.add_subplot(111)
|
graph = fig.add_subplot(111)
|
||||||
self.filledGraph(graph, days, "#aaffaa", *intervals)
|
self.filledGraph(graph, days, "#aaffaa", *intervals)
|
||||||
graph.set_ylabel(_("Cards"))
|
|
||||||
graph.set_xlabel(_("Days"))
|
|
||||||
graph.set_xlim(xmin=0, xmax=days)
|
graph.set_xlim(xmin=0, xmax=days)
|
||||||
return fig
|
return fig
|
||||||
|
|
||||||
|
@ -161,8 +155,6 @@ from cards where type = 1 and priority in (1,2,3,4) and interval > 21""")
|
||||||
else:
|
else:
|
||||||
colour = "#ffcccc"
|
colour = "#ffcccc"
|
||||||
self.filledGraph(graph, numdays, colour, *intervals)
|
self.filledGraph(graph, numdays, colour, *intervals)
|
||||||
graph.set_ylabel(_("Cards"))
|
|
||||||
graph.set_xlabel(_("Day"))
|
|
||||||
graph.set_xlim(xmin=-numdays, xmax=0)
|
graph.set_xlim(xmin=-numdays, xmax=0)
|
||||||
return fig
|
return fig
|
||||||
|
|
||||||
|
@ -237,7 +229,6 @@ from cards where type = 1 and priority in (1,2,3,4) and interval > 21""")
|
||||||
arr = [0] * arrsize
|
arr = [0] * arrsize
|
||||||
offset += 5
|
offset += 5
|
||||||
n += 1
|
n += 1
|
||||||
graph.set_ylabel("%")
|
|
||||||
x = ([""] + [str(n) for n in range(1, enum)]) * 3
|
x = ([""] + [str(n) for n in range(1, enum)]) * 3
|
||||||
graph.legend([p[0] for p in bars], (_("New"),
|
graph.legend([p[0] for p in bars], (_("New"),
|
||||||
_("Young"),
|
_("Young"),
|
||||||
|
|
Loading…
Reference in a new issue