File: animation.py

package info (click to toggle)
rpy 0.4.1-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,988 kB
  • ctags: 14,206
  • sloc: ansic: 15,392; python: 977; makefile: 406; sh: 28
file content (14 lines) | stat: -rw-r--r-- 292 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Make a simple animation with the chi-squared density
#
import chisquared
import time
from rpy import *

def anim(from_=1, to=30, pause=0.5):
    for i in range(from_, to+1):
        r.par(yaxt='n')
        chisquared.draw(i)
        time.sleep(pause)

if __name__ == '__main__':
    anim()