File: tkplot.py

package info (click to toggle)
pycode-browser 20120614%2Bgit%2Bb041dd2-7
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 6,236 kB
  • ctags: 1,194
  • sloc: python: 2,220; xml: 152; makefile: 39
file content (19 lines) | stat: -rwxr-xr-x 272 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from tkplot_class import *
from math import *

w = Tk()
gw1 = disp(w)
xy = []
for k in range(200):
	x = 2 * pi * k/200
	y = sin(x)
	xy.append((x,y))
gw1.setWorld(0, -1.0, 2*pi, 1.0)
gw1.line(xy)

gw2 = disp(w)
gw2.line([(10,10),(100,100),(350,50)], 'red')
w.mainloop()