You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2013/04/04 22:50:18 UTC
git commit: [#5453] `from PIL import Image` doesn't work all the time
Updated Branches:
refs/heads/master 0ce64c7b3 -> b08571f17
[#5453] `from PIL import Image` doesn't work all the time
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/b08571f1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/b08571f1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/b08571f1
Branch: refs/heads/master
Commit: b08571f17b65540cf75998e808042eaf3a2fec44
Parents: 0ce64c7
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Apr 4 20:46:01 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Apr 4 20:46:01 2013 +0000
----------------------------------------------------------------------
Allura/allura/lib/graphics/graphic_methods.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b08571f1/Allura/allura/lib/graphics/graphic_methods.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/graphics/graphic_methods.py b/Allura/allura/lib/graphics/graphic_methods.py
index cd3151b..88892c1 100644
--- a/Allura/allura/lib/graphics/graphic_methods.py
+++ b/Allura/allura/lib/graphics/graphic_methods.py
@@ -1,8 +1,9 @@
+import StringIO
+
from matplotlib.backends.backend_agg import FigureCanvasAgg
from matplotlib.figure import Figure
-from matplotlib.text import Annotation
-from PIL import Image
-import StringIO
+import Image
+
def create_histogram(data, tick_labels, y_label, title):
fig = Figure(figsize=(10,5), dpi=80, facecolor='white')
@@ -23,7 +24,7 @@ def create_histogram(data, tick_labels, y_label, title):
fig.subplots_adjust(bottom=0.3)
canvas.draw()
-
+
s = canvas.tostring_rgb()
l,b,w,h = fig.bbox.bounds
w, h = int(w), int(h)
@@ -66,4 +67,3 @@ def create_progress_bar(value):
im.save(output, 'PNG')
return output.getvalue()
-