Permalink
Browse files

Merge pull request #3 from xyb/master

fix demo for mac osx from xyb
  • Loading branch information...
2 parents 7218059 + e11ad52 commit a7425a73f70e8a26617dfabc6eb5386a42f6b948 Roger committed May 21, 2012
Showing with 12 additions and 2 deletions.
  1. +1 −0 README.md
  2. +11 −2 demo_waterfall.py
View
1 README.md
@@ -9,6 +9,7 @@ and also provides a more Pythonic API.
* Windows/Linux/OSX
* Python 2.7.x
+* distribute (a fork of the Setuptools project)
* librtlsdr (builds dated after 5/5/12)
* **Optional**: NumPy (wraps samples in a more convenient form)
View
13 demo_waterfall.py
@@ -3,6 +3,7 @@
from matplotlib.mlab import psd
import pylab as pyl
import numpy as np
+import sys
from rtlsdr import RtlSdr
# A simple waterfall, spectrum plotter
@@ -127,7 +128,15 @@ def update(self, *args):
def start(self):
self.update_plot_labels()
- ani = animation.FuncAnimation(self.fig, self.update, interval=50, blit=True)
+ if sys.platform == 'darwin':
+ # Disable blitting. The matplotlib.animation's restore_region()
+ # method is only implemented for the Agg-based backends,
+ # which the macosx backend is not.
+ blit = False
+ else:
+ blit = True
+ ani = animation.FuncAnimation(self.fig, self.update, interval=50,
+ blit=blit)
pyl.show()
@@ -150,4 +159,4 @@ def main():
if __name__ == '__main__':
- main()
+ main()

0 comments on commit a7425a7

Please sign in to comment.