File: link.py

package info (click to toggle)
pyx3 0.17-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,328 kB
  • sloc: python: 27,656; makefile: 225; ansic: 130; sh: 17
file content (15 lines) | stat: -rw-r--r-- 417 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import math
from pyx import *

c = canvas.canvas()

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

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

c.writeEPSfile("link")
c.writePDFfile("link")
c.writeSVGfile("link")