Skip to content
Browse files

(draw - reinstate matplotlib use directive with a FIXME explaining wh…

…y it is needed)

Ignore-this: 681bd3c33aedaa8895d7d5b085066aac

darcs-hash:20130716155553-3a4db-a5e129284e4d6e4873123723a3427848f687d84d
  • Loading branch information...
1 parent 8e83c53 commit 30d8ff7505cf0ce5db9581a90daabf4ba07d2400 @MattShannon committed Jul 16, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 armspeech/speech/draw.py
View
7 armspeech/speech/draw.py
@@ -16,6 +16,13 @@
import armspeech.numpy_settings
import matplotlib
import matplotlib.transforms as transforms
+# FIXME : below is necessary to avoid errors when drawing graphs when an
+# X server is not defined, for example when running distributed jobs.
+# This is dissatisfying, however, since stateful stuff like this should not
+# be set while importing a module (or even on a per-function-call basis).
+# The best solution is probably to use the matplotlib API rather than the
+# pyplot interface, in which case you explicitly specify the backend to use.
+matplotlib.use('Agg')
@codeDeps()
def partitionSeq(xs, numPartitions):

0 comments on commit 30d8ff7

Please sign in to comment.
Something went wrong with that request. Please try again.