add UnicodeEngine (MultiEngineText and axis texters returning MultiEngineText), texte...
[PyX.git] / examples / axis / log.py
blobbccf82762dc73ea390de52b2c1bbf8b4687625ea
1 import fractions, math
2 from pyx import *
3 from pyx.graph import axis
5 # we here use parters and texters which are explained in the examples below
6 log2parter = axis.parter.log([axis.parter.preexp([axis.tick.rational(1)], 4),
7 axis.parter.preexp([axis.tick.rational(1)], 2)])
8 log2texter = axis.texter.default(base=fractions.Fraction(2))
10 g = graph.graphxy(width=10,
11 x=axis.log(min=1, max=1024),
12 y=axis.log(min=1, max=1024, parter=log2parter),
13 y2=axis.log(min=1, max=1024, parter=log2parter, texter=log2texter))
15 g.writeEPSfile("log")
16 g.writePDFfile("log")
17 g.writeSVGfile("log")