add metapost dir to the packages list
[PyX.git] / examples / axis / log.py
blob30fbbf056aca526d36a5f039b196e1c6c819d037
1 import 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.exponential(nomantissaexp=r"{2^{%s}}",
9 mantissamax=axis.tick.rational(2))
11 g = graph.graphxy(width=10,
12 x=axis.log(min=1, max=1024),
13 y=axis.log(min=1, max=1024, parter=log2parter),
14 y2=axis.log(min=1, max=1024, parter=log2parter, texter=log2texter))
16 g.writeEPSfile("log")
17 g.writePDFfile("log")