]> rtime.felk.cvut.cz Git - coffee/coffee-flask.git/commitdiff
Make figures fit on screen
authorMichal Sojka <coffee@rtime.felk.cvut.cz>
Tue, 7 Aug 2018 13:23:30 +0000 (15:23 +0200)
committerMichal Sojka <coffee@rtime.felk.cvut.cz>
Tue, 7 Aug 2018 13:23:30 +0000 (15:23 +0200)
app.py

diff --git a/app.py b/app.py
index f5a247e08f8e9997399fe9472a41a6f0ab60f33e..59366327443b134dfcef1d3e73dee89abb703407 100644 (file)
--- a/app.py
+++ b/app.py
@@ -65,7 +65,7 @@ def coffee_graph_flavors():
         flavors, counts = zip(*db.coffee_flavors(uid))
     else:
         flavors, counts = zip(*db.coffee_flavors())
-    fig = plt.figure()
+    fig = plt.figure(figsize=(3,3))
     ax = fig.add_subplot(111)
     ax.set_aspect(1)
     ax.pie(counts)
@@ -88,7 +88,7 @@ def coffee_graph_history():
         counts = tuple()
     else:
         days, counts = zip(*hist)
-    fig = plt.figure()
+    fig = plt.figure(figsize=(4,3))
     ax = fig.add_subplot(111)
     ax.bar(range(len(days)), counts)
     ax.set_title("Your week")