File: tkplot.py

package info (click to toggle)
pycode-browser 1%3A1.02%2Bgit20181006-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 6,088 kB
  • sloc: python: 2,779; xml: 152; makefile: 71
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()