File: change.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 (14 lines) | stat: -rw-r--r-- 618 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from pyx import *

g = graph.graphxy(width=8,
                  x=graph.axis.linear(min=0, max=2),
                  y=graph.axis.linear(min=0, max=2),
                  key=graph.key.key(pos="br", dist=0.1))
g.plot([graph.data.function("x(y)=y**4", title=r"$x = y^4$"),
        graph.data.function("x(y)=y**2", title=r"$x = y^2$"),
        graph.data.function("x(y)=y", title=r"$x = y$"),
        graph.data.function("y(x)=x**2", title=r"$y = x^2$"),
        graph.data.function("y(x)=x**4", title=r"$y = x^4$")],
       [graph.style.line([color.gradient.Rainbow])])
g.writeEPSfile("change")
g.writePDFfile("change")