add example documentation to the split axes
[PyX/mjg.git] / gallery / graphs / cycliclink.py
blobdf82c1a8d19fe2395cf84eb2f1e10496ed4dc418
1 from pyx import *
3 c = canvas.canvas()
5 g1 = c.insert(graph.graphxy(width=8,
6 x=graph.axis.linear(min=0, max=1),
7 x2=graph.axis.linkedaxis()))
9 g2 = c.insert(graph.graphxy(width=8, ypos=g1.height+0.5,
10 x=graph.axis.linkedaxis(),
11 x2=graph.axis.log(min=1, max=1000)))
13 g1.axes["x2"].setlinkedaxis(g2.axes["x2"])
14 g2.axes["x"].setlinkedaxis(g1.axes["x"])
16 g1.plot(graph.data.function("y(x)=2*exp(-30*x)-exp(-3*x)"))
17 g2.plot(graph.data.function("y(x)=cos(20*x)*exp(-2*x)"))
19 c.writeEPSfile("cycliclink")
20 c.writePDFfile("cycliclink")