rename texmessage.loadfd to texmessage.loaddef and allow for .def and .fd files
[PyX/mjg.git] / examples / axis / simple.py
blob0ba831da082e02a3da7269dadc5cca300e3b9f18
1 # This is the basic example how to draw an axis along an arbitrary
2 # path. The function pathaxis from the graph.axis module takes a path
3 # and returns a canvas. Different from the typical usecase in graphs,
4 # we must fix the axis range by appropriate min and max arguments,
5 # because of missing data. In graphs the range can be adjusted
6 # automatically.
8 from pyx import *
10 c = graph.axis.pathaxis(path.curve(0, 0, 3, 0, 1, 4, 4, 4),
11 graph.axis.linear(min=0, max=10))
12 c.writeEPSfile("simple")
13 c.writePDFfile("simple")