1 # Certainly logarithmic axes are supported in PyX. By playing with
2 # partitioners and texters, you can easily change the base.
4 # It is left as an exercise to the reader to create a automatic
5 # partitioner for logarithmic axes with base 2.
10 p
= path
.curve(0, 0, 3, 0, 1, 4, 4, 4)
12 log2parter
= graph
.logparter([graph
.preexp(graph
.frac(1), 4),
13 graph
.preexp(graph
.frac(1), 2)])
14 log2texter
= graph
.exponentialtexter(nomantissaexp
=r
"{2^{%s}}",
15 mantissamax
=graph
.frac(2))
18 c
.insert(graph
.pathaxis(p
,
19 graph
.logaxis(min=1, max=1024)))
20 c
.insert(graph
.pathaxis(p
.transformed(trafo
.translate(4, 0)),
21 graph
.logaxis(min=1, max=1024, parter
=log2parter
)))
22 c
.insert(graph
.pathaxis(p
.transformed(trafo
.translate(8, 0)),
23 graph
.logaxis(min=1, max=1024, parter
=log2parter
,