Did I find the right examples for you? yes no      Crawl my project      Python Jobs

# Canvas.Line

All Samples(33)  |  Call(25)  |  Derive(0)  |  Import(8)

```import sys
import Tkinter
from Canvas import Line, CanvasText, Rectangle
import tkFileDialog
import string, math, os
```
```                p1 = (scale[0]*lower)+shift[0], (scale[1]*y)+shift[1]
p2 = (scale[0]*upper)+shift[0], (scale[1]*y)+shift[1]
Line(self.draw, p1[0], p1[1], p2[0], p2[1],
fill = 'black', width = 1)
if xticks:
for x, label in xticks:
p = (scale[0]*x)+shift[0], \
(scale[1]*y)+shift[1]
Line(self.draw, p[0], p[1], p[0], p[1]+d,
```
```                p1 = (scale[0]*x)+shift[0], (scale[1]*lower)+shift[1]
p2 = (scale[0]*x)+shift[0], (scale[1]*upper)+shift[1]
Line(self.draw, p1[0], p1[1], p2[0], p2[1],
fill = 'black', width = 1)
if yticks:
for y, label in yticks:
p = (scale[0]*x)+shift[0], \
(scale[1]*y)+shift[1]
Line(self.draw, p[0], p[1], p[0]-d, p[1],
```

```
from Tkinter import *
from Canvas import Line, Rectangle
import random

```
```        self.report = Label(self.frame)
self.report.pack()
self.left = Line(self.canvas, 0, 0, 0, 0)
self.right = Line(self.canvas, 0, 0, 0, 0)
self.pivot = Line(self.canvas, 0, 0, 0, 0)
```

```
from Tkinter import *
from Canvas import Line, Rectangle
import random

```
```        self.report = Label(self.frame)
self.report.pack()
self.left = Line(self.canvas, 0, 0, 0, 0)
self.right = Line(self.canvas, 0, 0, 0, 0)
self.pivot = Line(self.canvas, 0, 0, 0, 0)
```

```
from Tkinter import *
from Canvas import Line, Rectangle
import random

```
```        self.report = Label(self.frame)
self.report.pack()
self.left = Line(self.canvas, 0, 0, 0, 0)
self.right = Line(self.canvas, 0, 0, 0, 0)
self.pivot = Line(self.canvas, 0, 0, 0, 0)
```

```
from Tkinter import *
from Canvas import Line, Rectangle
import random

```
```        self.report = Label(self.frame)
self.report.pack()
self.left = Line(self.canvas, 0, 0, 0, 0)
self.right = Line(self.canvas, 0, 0, 0, 0)
self.pivot = Line(self.canvas, 0, 0, 0, 0)
```

```
from Tkinter import *
from Canvas import Line, Rectangle
import random

```
```        self.report = Label(self.frame)
self.report.pack()
self.left = Line(self.canvas, 0, 0, 0, 0)
self.right = Line(self.canvas, 0, 0, 0, 0)
self.pivot = Line(self.canvas, 0, 0, 0, 0)
```

```
from Tkinter import *
from Canvas import Line, Rectangle
import random

```
```        self.report = Label(self.frame)
self.report.pack()
self.left = Line(self.canvas, 0, 0, 0, 0)
self.right = Line(self.canvas, 0, 0, 0, 0)
self.pivot = Line(self.canvas, 0, 0, 0, 0)
```

```
from Tkinter import *
from Canvas import Line, Rectangle
import random

```
```        self.report = Label(self.frame)
self.report.pack()
self.left = Line(self.canvas, 0, 0, 0, 0)
self.right = Line(self.canvas, 0, 0, 0, 0)
self.pivot = Line(self.canvas, 0, 0, 0, 0)
```