two small new graph examples
[PyX/mjg.git] / examples / graphs / link.py
blobc53ceffd18e6287e2eff5b0aff2fb4b2b06cbb77
1 import math
2 from pyx import *
4 c = canvas.canvas()
6 g1 = c.insert(graph.graphxy(width=8,
7 x=graph.linaxis(min=0, max=1)))
8 g1.plot(graph.function("y=2*exp(-30*x)-exp(-3*x)"))
10 g2 = c.insert(graph.graphxy(width=8, ypos=g1.height+0.5,
11 x=g1.axes["x"].createlinkaxis()))
12 g2.plot(graph.function("y=cos(20*x)*exp(-2*x)"))
14 c.writetofile("link")