---
# System prepended metadata

title: grid

---

# grid
```
# ch31_4.py
import turtle
a,b = -365,-300
n = 600
step = 20
t = turtle.Pen()
t.speed(0)
t.width(0.1)
t.hideturtle()
for i in range(0, n+step, step):
    t.penup()
    t.setpos(i+a,b)
    t.pendown()
    t.setpos(a, n-i+b)
#turtle.done()
t = turtle.getscreen()
t.getcanvas().postscript(file='grid.eps')
```
![](https://i.imgur.com/6bKcBDE.jpg)