Skip to content

Commit

Permalink
fix example to run without a DISPLAY
Browse files Browse the repository at this point in the history
this is necessary to run the example on travis-ci
  • Loading branch information
skuschel committed Dec 11, 2014
1 parent c7a8ded commit 4517536
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/simpleexample.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
import numpy as np
import postpic as pp

# postpic will use matplotlib for plotting. Changing matplotlibs backend
# to "Agg" makes it possible to save plots without a display attached.
# This is necessary to run this example within the "run-tests" script
# on travis-ci.
import matplotlib; matplotlib.use('Agg')


pp.datareader.chooseCode('dummy')

Expand Down

0 comments on commit 4517536

Please sign in to comment.