File: animation.py

package info (click to toggle)
rpy 1.0.3-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 636 kB
  • ctags: 774
  • sloc: ansic: 2,139; python: 1,591; makefile: 119; sh: 73
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()