ws cleanup
[PyX/mjg.git] / examples / axis / painter.py
blob72ac9661cf30126cef54250eed69f7c8bb653b15
1 # The axispainter performs the painting of an axis. By default, ticks
2 # are stroked inside of the graph (in the path examples there is no
3 # graph but don't mind) while labels and the axis title are plotted
4 # outside. The axistitle is rotated along the axis (without writing it
5 # upside down), while the tick labels are not rotated. The axispainter
6 # takes a variety of keyword arguments to modify the default
7 # behaviour.
9 from pyx import *
11 ap = graph.axispainter(outerticklengths=graph.axispainter.defaultticklengths)
13 c = canvas.canvas()
14 c.insert(graph.pathaxis(path.curve(0, 0, 3, 0, 1, 4, 4, 4),
15 graph.linaxis(min=0, max=10, title="axis title",
16 painter=ap)))
17 c.writetofile("painter")