File: rating.py

package info (click to toggle)
pyx 0.9-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,064 kB
  • ctags: 2,665
  • sloc: python: 15,205; makefile: 142; ansic: 131
file content (14 lines) | stat: -rw-r--r-- 412 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from pyx import *

p2 = path.curve(0, 0, 3, 0, 1, 4, 4, 4)
p1 = p2.transformed(trafo.translate(-4, 0).scaled(0.75))
p3 = p2.transformed(trafo.scale(1.25).translated(4, 0))

myaxis = graph.axis.linear(min=0, max=10)

c = canvas.canvas()
c.insert(graph.axis.pathaxis(p1, myaxis))
c.insert(graph.axis.pathaxis(p2, myaxis))
c.insert(graph.axis.pathaxis(p3, myaxis))
c.writeEPSfile("rating")
c.writePDFfile("rating")