PostScript uses the point, 1/72 of an inch, as its default unit.
Since you are probably not accustomed to thinking in points,
you will want to change this so that a single unit is an inch.
(Actually, you probably shouldn't be thinking inches either, but for
historical reasons we will let you get away with it.) You should do
this with the "scale" command. For example, to change units to inches
you would use:
72 72 scale
Remember, arguments before operation!
Lines in PostScript can be described by their thickness, how they look at corners, how they look at ends, and perhaps a dash pattern. The thickness is set by "setlinewidth", whose argument is a number in terms of the current units. A convienient argument is, in fact, 0, which sets the line width to the smallest width the device can draw. A good place to start for lines that have some thickness is:
.025 setlinewidth 2 setlinecap 2 setlinejoinThe "setlinecap" command affects how lines look at the ends, and the "setlinejoin" affects how lines look when they meet at angles. The meaning of these arguments, and some more choices, are listed in the command summary for this section. If you want, you can experiment to find a combination that looks pleasing to you.
You can control the colour of objects that you draw with the "setgray" command. This takes a number between 0 and 1 (1 being white and 0 being black) and uses this as the ink color. If you are working on a color screen or printer, you might also try "setrgbcolor", which takes red, green, and blue values as arguments, again between 0 and 1.
![]() |