reduce length of pattern lines by one order of magnitude to prevent problems with...
[PyX/mjg.git] / examples / hello.txt
blob4368a090feae8b5c2cf8a90175fd46d067d15bcf
1 Hello, world!
3 As it is good practice to say "Hello, world!" in the first example, let's
4 discuss how to do that in PyX.
6 At first we import the PyX modules. Most PyX programs will start with a line
7 like that. In order to produce some output we create a canvas instance `c`. Such
8 an instance provides some useful methods to output some text at a certain
9 position and for directly stroking a path, for which we use a `line` instance
10 from the `path` module here. Once this is done, we write an EPS file and a PDF
11 file containing all items inserted into the canvas instance.