File: link.py

package info (click to toggle)
pyx 0.7.1-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,756 kB
  • ctags: 2,584
  • sloc: python: 12,675; ansic: 1,711; makefile: 168; sh: 16
file content (14 lines) | stat: -rw-r--r-- 408 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import math
from pyx import *

c = canvas.canvas()

g1 = c.insert(graph.graphxy(width=8,
                            x=graph.axis.linear(min=0, max=1)))
g1.plot(graph.data.function("y=2*exp(-30*x)-exp(-3*x)"))

g2 = c.insert(graph.graphxy(width=8, ypos=g1.height+0.5,
                            x=g1.axes["x"].createlinkaxis()))
g2.plot(graph.data.function("y=cos(20*x)*exp(-2*x)"))

c.writeEPSfile("link")