~ubuntu-branches/debian/sid/pyx/sid

« back to all changes in this revision

Viewing changes to examples/graphs/points.py

  • Committer: Bazaar Package Importer
  • Author(s): Stuart Prescott
  • Date: 2011-05-20 00:13:52 UTC
  • mto: (9.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20110520001352-odcuqpdezuusbbw1
Tags: upstream-0.11.1
ImportĀ upstreamĀ versionĀ 0.11.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# suggested by Chris Spencer
 
2
 
 
3
from pyx import *
 
4
 
 
5
g = graph.graphxy(width=8)
 
6
# either provide lists of the individual coordinates
 
7
g.plot(graph.data.values(x=range(10), y=range(10)))
 
8
# or provide one list containing the whole points
 
9
g.plot(graph.data.points(zip(range(10), range(10)), x=1, y=2))
 
10
g.writeEPSfile("points")
 
11
g.writePDFfile("points")
 
12