GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — python/Graph Plot/Graph Plot.py at master · LeoJr2015/python

Expand file tree

/

Graph Plot.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
42 lines (31 loc) · 1.25 KB
/

Graph Plot.py

Copy path

File metadata and controls

42 lines (31 loc) · 1.25 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from Tkinter import *
def main():
root = Tk()
root.title('Simple Plot - Version 3 - Smoothed')
#try:
if 1 == 1:
canvas = Canvas(root, width=450, height=300, bg = 'white')
canvas.pack()
Button(root, text='Quit', command=root.quit).pack()
canvas.create_line(100,250,400,250, width=2)
canvas.create_line(100,250,100,50, width=2)
for i in range(11):
x = 100 + (i * 30)
canvas.create_line(x,250,x,245, width=2)
canvas.create_text(x,254, text='%d'% (10*i), anchor=N)
for i in range(6):
y = 250 - (i * 40)
canvas.create_line(100,y,105,y, width=2)
canvas.create_text(96,y, text='%5.1f'% (50.*i), anchor=E)
scaled = []
for x,y in [(12, 56), (20, 94), (33, 98), (45, 120), (61, 180),
(75, 160), (98, 223)]:
scaled.append((100 + 3*x, 250 - (4*y)/5))
canvas.create_line(scaled, fill='black', smooth=0)
for xs,ys in scaled:
canvas.create_oval(xs-2,ys-2,xs+2,ys+2, width=1,
outline='black', fill='SkyBlue2')
#except:
#print 'An error has occured!'
root.mainloop()
main()
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.