File: points.py

package info (click to toggle)
pyx 0.11.1-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 3,468 kB
  • sloc: python: 18,575; ansic: 99; makefile: 91; sh: 9
file content (12 lines) | stat: -rw-r--r-- 345 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
# suggested by Chris Spencer

from pyx import *

g = graph.graphxy(width=8)
# either provide lists of the individual coordinates
g.plot(graph.data.values(x=range(10), y=range(10)))
# or provide one list containing the whole points
g.plot(graph.data.points(zip(range(10), range(10)), x=1, y=2))
g.writeEPSfile("points")
g.writePDFfile("points")